ARIA
Some elements cannot carry an ARIA name
- Rule:
aria-prohibited-attr - Severity: Serious
- WCAG level A
Why it matters
A generic element — a plain div or span with no role — is not allowed a name. Assistive technology ignores aria-label there, so the label you wrote is simply never read.
How to fix it
- Give the element a role that supports naming, or use a semantic element such as <section>, <nav> or a heading.
- If the label is only meant for sighted users, use visible text instead.
- Remove aria-label where the element is decorative.
In markup
<div aria-label="Latest news">Latest news</div><section aria-label="Latest news">Latest news</section>The requirement behind it
This rule is one way of failing the following WCAG 2.2 success criteria. The W3C, which writes the standard, explains each of them:
- 4.1.2 Name, Role, Value (opens in new tab) — WCAG level A
Further reading
Deque University on aria-prohibited-attr (opens in new tab)
Deque maintains axe-core, the open-source engine our scanner runs. Their page documents the rule as the engine implements it.
Automated checks find failures a browser can prove. They cannot judge whether a caption is accurate, whether an alt text is useful, or whether a page can be operated end to end with a keyboard — those need a person.