Start scanning free

( Robust / WCAG 4.1.2 )

ARIA attribute is not valid for the current role value

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

Serious Level A WCAG 4.1.2 — Name, Role, Value

What’s wrong

Some ARIA attributes are only valid on an element for certain values of another attribute. For example, aria-checked on a role="checkbox" needs a value of true, false, or mixed, and some attributes are only allowed depending on the element’s current state. This attribute’s value conflicts with the role’s rules.

Why it matters

Assistive tech relies on ARIA state attributes matching the role exactly. An invalid combination can make the browser drop the attribute entirely, so the state never gets announced.

How to fix it

Check the ARIA spec for the role in question and only apply the attribute with values that are valid for the current state.

Before
<div role="menuitem" aria-checked="true">Enable notifications</div>
After
<div role="menuitemcheckbox" aria-checked="true">Enable notifications</div>

Learn more