tooltip-name-present

Tooltips have an accessible name

automaticWCAG 4.1.2 (A)confidence: highseverity: seriousrobust

Checks that elements with role="tooltip" expose a non-empty accessible name.

Applies to. Applies to elements carrying role="tooltip" (the attribute must name that role alone, not a fallback list) that are included in the accessibility tree. An element with the matching implicit role but no role attribute is out of scope.

Expectation. The element has a non-empty accessible name from aria-label, from an aria-labelledby that resolves to non-empty text, from title, or, role="tooltip" being name-from-content, from its own subtree text, where a descendant's own name (an <img alt>, aria-label or title) counts as that descendant's contribution rather than only its text nodes.

Examples

pass
<div role="tooltip">Click to save your changes</div>

Visible text content names the tooltip.

fail
<div role="tooltip"></div>

No text content and no accessible name.

View source