How to fix error not associated on WooCommerce

Add `aria-invalid="true"` and a linked `aria-describedby` error message to every form field that fails validation, so screen reader users are told exactly what went wrong.

Steps for WooCommerce

  1. Go to your WordPress admin → Appearance → Theme File Editor (or use a child theme and edit files via FTP/SSH).
  2. WooCommerce checkout fields are rendered by woocommerce/templates/checkout/form-checkout.php and individual field templates in woocommerce/templates/form-fields/.
  3. The recommended approach is to use WooCommerce's woocommerce_form_field filter in your child theme's functions.php to modify field output and inject aria-describedby and a sibling error span into each field's HTML.
  4. Alternatively, install the 'Accessible WooCommerce' plugin or a dedicated WooCommerce accessibility plugin that patches ARIA attributes automatically.
  5. For custom or page-builder checkout pages, add a small JavaScript snippet (via Appearance → Customize → Additional CSS/JS or a plugin like 'Code Snippets') that hooks WooCommerce's checkout_error event to apply aria-invalid and populate the linked error spans.
  6. Test on the /checkout and /my-account pages with a screen reader.
Official WooCommerce documentation ↗

What is error not associated?

When a customer fills out a form on your site (checkout, contact, newsletter sign-up) and submits it with a mistake, your site needs to tell them two things: (1) that the field is in an error state, and (2) what the error actually is. Sighted users see this visually — a red border, an error message below the field. But screen reader users rely on invisible HTML attributes called `aria-invalid` and `aria-describedby` to receive the same information. Without these attributes, a screen reader user hits Submit, nothing seems to happen, and they have no idea which field failed or why. WCAG 2.1 Success Criterion 3.3.1 (Error Identification) requires that input errors be identified and described to the user in text.

Roughly 7–8 million people in the US use screen readers, and many more use other assistive technologies. If your checkout or contact form is inaccessible, these customers simply cannot complete a purchase or inquiry — which is lost revenue you may not even know about. Beyond conversions, the ADA and similar laws in many countries treat web accessibility failures as discrimination, creating legal exposure including demand letters and lawsuits that have cost retailers thousands to hundreds of thousands of dollars to resolve. Fixing form error accessibility is also a direct ranking signal for Google's Core Web Vitals and overall page-experience scores, meaning it can influence organic search visibility. This is a quick, targeted fix with an outsized impact on inclusivity, revenue, and legal risk.

See the complete Error not associated guide for every platform and the full background.

Not sure if your WooCommerce store has this?

Run a free SEOLZ scan — we’ll find error not associated and every other issue across your whole site.

Scan my site free

Fix error not associated on another platform