NeovaGeavanceerd SEO-platform

ARIA-attribuut is niet toegestaan voor de rol van het element

In Neova Draait op de crawl zelf: niets in te stellen.

Regel laatst nagekeken op 17 oktober 2026 · Gids bijgewerkt op 21 september 2026

WCAG 4.1.2 vereist geldige toestanden en eigenschappen. Schermlezers negeren een attribuut dat de rol niet ondersteunt of lezen het verkeerd, waardoor de toestand hen mogelijk niet bereikt.

Wat je zou kunnen doen

Verwijder het attribuut, of wijzig de rol in een rol die het ondersteunt.

Waarom Neova dit markeert

  • Elke ARIA-rol ondersteunt alleen bepaalde attributen; andere worden genegeerd of verkeerd gelezen door schermlezers.
  • Een toestand zoals expanded of selected op de verkeerde rol bereikt de gebruiker nooit.
  • WCAG 4.1.2 (niveau A) vereist dat toestanden en eigenschappen correct worden doorgegeven.

Bronnen

De volledige gids

Dit deel is voorlopig in het Engels.

TL;DR: This issue fires when an element carries an aria-* attribute that is not permitted for its role. The fix is to remove the attribute that does not belong, switch to a role that actually supports it, or drop the ARIA entirely and use a native HTML element that already has the right semantics. It maps to WCAG 4.1.2 Name, Role, Value.

What This Means

Every ARIA role has a defined set of states and properties it is allowed to use. The WAI-ARIA specification sorts these into required attributes, supported attributes, and attributes inherited from parent roles. When you place an aria-* attribute on an element whose role does not list that attribute, the pairing is invalid. The axe rule name is aria-allowed-attr, and the plain-language version is "Elements must only use allowed ARIA attributes."

A common example: aria-checked is only valid on roles such as checkbox, radio, menuitemcheckbox, and menuitemradio. Put it on a plain link or a generic div with no matching role and it is not allowed there.

Why It Matters

When assistive technology meets a role-attribute mismatch, it has no reliable way to interpret the extra attribute. It may ignore the attribute, or it may announce or behave in an unexpected way. At best the disallowed attribute does nothing; at worst it blocks access to a whole region of the interface. Screen reader users can end up with a control that is mislabeled, mis-stated, or simply unusable.

This is a Name, Role, Value problem under WCAG 2.1 Success Criterion 4.1.2 (Level A). The criterion requires that the name, role, states, and properties of every user-interface component can be programmatically determined. A disallowed ARIA attribute breaks that contract because the role and the property contradict each other. Clean ARIA also keeps your markup machine-readable for the growing set of automated and AI agents that parse the page, not just traditional screen readers.

Which Attributes Belong to Which Roles

The whole rule comes down to matching a property to a role that actually lists it. This is not the full ARIA table, but it covers the mismatches that get flagged most often. Read it as: this attribute is only allowed where the right-hand column applies.

Attribute Allowed on Roles Like Flagged When Put On
aria-checked checkbox, radio, menuitemcheckbox, switch a link, a plain div, a button
aria-selected option, tab, row, gridcell a listitem, a generic span
aria-valuenow slider, progressbar, spinbutton, scrollbar a button, a checkbox
aria-posinset option, listitem, menuitem, tab a heading, a paragraph
aria-label, aria-hidden almost everything (global) rarely flagged; check the role first

How to Detect It

Three tools will find every instance without you reading markup by hand. Run at least one on any page with custom widgets.

  1. axe DevTools (browser extension). Open your browser dev tools, pick the axe tab, and run a scan. The violation appears as aria-allowed-attr with "Elements must only use allowed ARIA attributes"; each result highlights the element, its role, and the offending attribute. Newer builds phrase it as "supported ARIA attributes."
  2. Google Lighthouse. In Chrome dev tools, open the Lighthouse tab, tick Accessibility, and generate a report. The same failure shows under Accessibility as "[aria-*] attributes are not allowed for this element's role," with a list of failing nodes.
  3. ARIA DevTools (browser extension). This one renders the page the way a screen reader sees it, so you can spot the contradictory role-attribute pairing in context and confirm which attribute the role actually supports before you touch code.

WAVE, Accessibility Insights, and Neova's accessibility module flag the same condition, so any of them can confirm a fix once you have made it.

How to Fix It

1. Identify the Element's Role

Check for an explicit role attribute. If there is none, the element uses the implicit role of its tag. For instance, <input type="checkbox"> has the implicit role checkbox, and <nav> has the role navigation.

2. Remove Attributes Not Valid for the Role

Look up the role in the WAI-ARIA specification and check its required, supported, and inherited attributes. Delete any aria-* attribute that is not on that list.

<!-- Bad: aria-checked is not allowed on a link -->
<a href="https://example.com/filter" aria-checked="true">Show in stock</a>

<!-- Good: drop the disallowed attribute -->
<a href="https://example.com/filter">Show in stock</a>

3. Use a Role That Supports the Attribute

If the attribute really is needed, the element is probably the wrong role. Give it a role that lists that attribute as required or supported.

<!-- Good: aria-checked is valid on role="checkbox" -->
<span role="checkbox" tabindex="0" aria-checked="true">
  Show in stock
</span>

4. Prefer Native HTML

The first rule of ARIA is to use a native element when one provides the semantics and keyboard behavior you need. Native controls carry the correct role and state support for free, so the mismatch cannot happen.

<!-- Best: native checkbox, no ARIA needed -->
<label>
  <input type="checkbox" checked> Show in stock
</label>

False Positives

Genuine false positives are rare, but a few cases are worth checking before you change code. Global ARIA attributes such as aria-label, aria-hidden, and aria-describedby are allowed almost everywhere; if one is flagged, the element more likely has an unusual or contradictory role that narrows what is permitted. If a framework or component library injects the attribute at runtime, confirm what is actually in the rendered DOM rather than the source template. And if an attribute is added by script only when a matching role is also present, test the live state rather than the initial markup.

Want a full sweep of your site's ARIA and accessibility issues, prioritized and explained?

FAQ

Is This the Same as the "Prohibited ARIA Attributes" Issue?

No, but they are close cousins. "Allowed" (aria-allowed-attr) checks that an attribute is valid for the element's role. "Prohibited" (aria-prohibited-attr) flags attributes such as aria-label on elements that should not be named at all. Both come down to matching attributes to the correct role.

Will an Invalid Attribute Always Break the Page?

Not always, and that is the risk. Many assistive technologies simply ignore the disallowed attribute, so the page may seem fine in casual testing. But behavior is undefined, so some tools will mis-announce or mishandle the control. Fix it rather than relying on it being ignored.

How Do I Know Which Attributes a Role Allows?

Each role in the WAI-ARIA specification lists its required, supported, and inherited states and properties. Look up the role, compare that list to the attributes on your element, and remove anything that is not present.

Should I Add a Role to Keep the Attribute, or Remove the Attribute?

Ask what the element is meant to do. If it genuinely behaves like a checkbox or tab, give it the matching role (and the keyboard support that role implies). If the attribute was a leftover or copy-paste error, just remove it. When in doubt, reach for a native HTML element instead.

Vind dit op je eigen site

Neova voert deze check en alle andere bij elke crawl uit en schrijft de oplossing als ticket voor je team.

  • Desktop-app voor Mac, Windows en Linux
  • Alle 696 checks, elk met zijn bron
  • Search Console en Analytics 4, alleen-lezen gekoppeld
  • Tickets naar Jira, Linear en Asana

Download Neova Desktop Free-abonnement, of Solo 14 dagen gratis, zonder kaart.

Alle checks in de categorie Toegankelijkheid · Gidsen · Checkbibliotheek

Geschreven door Neova Labs · Terug naar de Checkbibliotheek