ARIA
aria-roledescription needs a role to describe
- Rule:
aria-roledescription - Severity: Serious
- WCAG level A
Why it matters
The attribute replaces the spoken name of a role. On an element with no role there is nothing to replace, so it is dropped and the custom wording never reaches anyone.
How to fix it
- Add an explicit role to the element before describing it.
- Keep the description short and in the page language — it is read out every time.
- Do not rename a familiar role for decoration: "Slide" helps, "Fancy box" does not.
In markup
<div aria-roledescription="Slide">...</div><div role="group" aria-roledescription="Slide" aria-label="1 of 5">...</div>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-roledescription (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.