axe-core rule: aria-allowed-attr
Elements use ARIA attributes that are not allowed for their role
What it is
Elements carry ARIA attributes that are not valid for their role (for example aria-checked on a plain button), so assistive technology ignores them or reports the wrong state.
Who it blocks
Screen reader users may hear missing or incorrect state information, such as a toggle that never reports being on or off.
How to fix it
Use only the ARIA attributes permitted for the element role, or change the role to one that supports the state you need.
Example fix
<!-- Before: aria-checked is not allowed on role=button -->
<button aria-checked="true">Email me offers</button>
<!-- After: use a role that supports the state -->
<button role="switch" aria-checked="true">Email me offers</button>
This is one of the barrier types BarrierScan checks for on every scan. Request a free accessibility scan to see whether it appears on your site, alongside the rest of the automated findings.