How to fix: aria attributes not allowed on element
WCAG 2.2 success criterion 4.1.2 (level A)
Why it matters
Assistive technology may ignore or misread the element.
How to fix
Remove ARIA attributes that do not fit the element's role.
<!-- remove aria-checked from a plain link -->
Test it yourself
- Inspect the element and compare its aria-* attributes with its role: for example aria-checked only belongs on checkboxes, switches and similar.
Common mistakes
- aria-expanded on a plain link that opens nothing.
- Copying ARIA from a widget example onto a different kind of element.
Check your own site
Find this and other problems on your website in 30 seconds, free.