Avoid ARIA attributes that are prohibited for an element’s role

Content available in English only.

Accessibility isn’t just about avoiding violations — it’s about ensuring that everyone can use your product with confidence. This guide explains each rule’s intent, highlights common issues, and shows how to fix them according to WCAG and the European Accessibility Act (EAA).

These guidelines do not replace the official WCAG standards. They’re concise, developer-focused notes to help you identify and fix issues effectively.

Never use ARIA attributes prohibited for the element’s role.

Why this matters and how to fix it

Why this matters

Each ARIA role specifies which attributes are allowed. Using prohibited attributes sends conflicting signals to assistive technologies, causing elements to be ignored, misinterpreted, or announced incorrectly.

How to fix this issue

Verify the allowed ARIA attributes for an element’s role according to the WAI-ARIA specification. Remove unsupported attributes or change the element to one with a native role matching the intended behavior. Prefer native HTML elements when possible for built-in semantics.

Automated detection · Manual review recommended

Developer guidance

Prohibited ARIA attributes often appear when components are reused or props are spread without validation. For example, `aria-checked` is only valid on roles such as `checkbox`, `switch`, `radio`, `menuitemcheckbox`, and `menuitemradio`, not on `button`. Enforce ARIA validation in your design system and detect invalid attribute use with the GetWCAG automated scanner.


Code examples

Incorrect Implementation

<button aria-checked="true">Submit</button>

Correct Implementation

<button>Submit</button>

Real-World Examples

Before

<div role="button" aria-checked="true">Click me</div> <!-- aria-checked ignored by screen reader -->

After

<div role="checkbox" aria-checked="true">Click me</div> <!-- Correct role and state announced -->

Manual testing

  1. 1. Inspect elements with ARIA attributes.
  2. 2. Check each attribute against the element’s role in the WAI-ARIA spec.
  3. 3. Remove attributes that are not allowed for the role.
  4. 4. Test with a screen reader to ensure correct announcement.
  5. 5. Run a scan with the GetWCAG automated scanner to ensure no prohibited ARIA attributes are present.
eu icon getwcag

Trusted by organizations across Europe working toward WCAG and EAA conformance