Skip to main content

ARIA mistakes

Use ARIA sparingly; prefer native HTML.

See this on your site

Step-by-step fixes by platform

Programmatic guides combine the issue explanation with stack-specific notes and examples where we have them.

Guidance

Fix invalid combinations reported by automated tools; validate with browser accessibility inspectors.

Examples

  • role="button" on a div without tabIndex and keyboard handlers.
  • aria-expanded missing on toggles.

How to fix

Prefer native elements; validate custom widgets with browser a11y inspectors.

Remove invalid combinations reported by axe; retest with keyboard.

Platform notes

React
Prop spread onto DOM can inject conflicting roles—lint and type helper components.

Related: 4.1.2 Name, Role, Value.