ARIA
Tooltips need content
- Rule:
aria-tooltip-name - Severity: Serious
- WCAG level A
Why it matters
An element with role="tooltip" and no text produces nothing when the control it describes is focused, so the extra explanation is lost.
How to fix it
- Put the explanatory text inside the tooltip element.
- Reference it from the control with aria-describedby.
- Never put information in a tooltip that is not also available another way — tooltips are unreliable on touch devices.
In markup
<div role="tooltip" id="tip"></div><div role="tooltip" id="tip">Opens in a new window</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-tooltip-name (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.