Skip to content

Rule · Accessibility

ARIA attribute is prohibited for this role

a11y/aria-prohibited-attrwarnvoid a11yupdated

Why it matters

Some roles prohibit naming. For example, aria-label on a generic <div> or <span> is ignored by most screen readers, so the text you expected users to hear is never announced.

How to fix it

Move the label onto an element with a role that supports naming, or render the text visibly.

References

void a11y reports 48 rules in this category. WCAG 2.2 AA through axe-core, plus checks axe can't do alone: visible keyboard focus, 24/44px target size on mobile, 320px reflow and disabled zoom.