Skip to content

ARIA used incorrectly

ARIA attributes tell assistive technology what an element is and does. Some on this page are invalid, are missing attributes their role requires, or hide focusable elements from screen readers.

Why it matters

Wrong ARIA gives screen readers false information. W3C’s own guide puts it plainly: no ARIA is better than bad ARIA.

aria-hidden on something that can still get focus leaves keyboard users on an element screen readers say nothing about.

How to fix it

  1. Prefer native HTML elements, which need no ARIA: a button instead of a div with role="button".
  2. Where you use ARIA, use valid roles and attributes, and include the ones a role requires (a role="checkbox" needs aria-checked).
  3. Never put aria-hidden="true" on elements that can get focus, or on a container that holds them.

Common mistakes

  • Adding ARIA to fix what a native element would do on its own.
  • Copying ARIA from a component library without updating its states (aria-expanded left false on an open menu).

Check your fix

Once the change is live, check the page again.