How to fix: aria attributes that are not allowed here
WCAG 2.2 success criterion 4.1.2 (level A)
Why it matters
aria-label on a plain div or span is ignored by many screen readers, so the text is lost.
How to fix
Move the label to an element with a role, or use visible text.
<span>4 of 5 stars</span> <!-- not <span aria-label="4 of 5"> -->
Test it yourself
- Look for aria-label on elements with no role, such as a plain <div> or <span>: screen readers usually ignore it there.
Common mistakes
- aria-label on a <div> to "name" a section without giving it a role like region.
- aria-label on a <span> inside a link instead of on the link itself.
Check your own site
Find this and other problems on your website in 30 seconds, free.