Start scanning free

( Robust / WCAG 4.1.2 )

ARIA attribute is not allowed for this role

This check maps to Name, Role, Value. Use the guidance below to confirm the issue, understand who it affects and ship a fix.

Moderate Level A WCAG 4.1.2 — Name, Role, Value

What’s wrong

An ARIA attribute is used on an element role that does not support that attribute.

Why it matters

Screen reader users depend on valid role and state pairs for accurate announcements. Invalid attributes can be ignored or read in confusing ways.

How to fix it

Use semantic HTML and valid ARIA so assistive technology gets the same state and structure as sighted users. Keep labels and states explicit in markup.

Before
<div role="button" aria-selected="true">Save</div>
After
<div role="button" aria-pressed="true">Save</div>

If this pattern is generated by a component, fix it once in the shared component so every instance inherits the accessible behavior.

Learn more