aria-tooltip-name
Web validation
The tooltip role is used to provide additional contextual information about another element, typically when that element receives keyboard focus or mouse hover. For this to be effective and accessible, the tooltip itself must expose a clear, accessible name to assistive technologies.
If a tooltip lacks an accessible name, whether from its contents, the title attribute or an ARIA attribute, it cannot convey its intended description. This prevents screen reader users from understanding the tooltip’s purpose or content, making interactions confusing or incomplete.
Tooltips can get their accessible name in four ways:
- From the text content inside the element
- Using
aria-labelwith a string value - Using
aria-labelledbyto reference another element with discernible text - Using
titlewith a string value
Pass Patterns
Using aria-label
This tooltip includes an aria-label that provides an accessible name.
<div role="tooltip" id="tip1" aria-label="Helpful description"></div>Using aria-labelledby
This example uses aria-labelledby to reference another element with visible text.
<div id="tooltipLabel">What is reading mode?</div>
<div role="tooltip" id="tip2" aria-labelledby="tooltipLabel">
<!-- Tooltip content -->
</div>Accessible name via text content
This tooltip gets its name from its inner text content, which is directly exposed to assistive technologies.
<div role="tooltip" id="tip3">This is the tooltip text</div>Using the title attribute
This example uses the title attribute, which is generally discouraged for critical content but still provides a name.
<div role="tooltip" id="tip4" title="Info text"></div>Fail Patterns
Missing name
This tooltip has no content or accessible naming attributes, so it lacks an accessible name.
<div role="tooltip" id="tooltip1"></div>Empty aria-label attribute
This tooltip includes an empty aria-label, which results in no accessible name.
<div role="tooltip" id="tooltip2" aria-label=""></div>Non-existent aria-labelledby references
This tooltip uses aria-labelledby to reference a non-existent element.
<div role="tooltip" id="tooltip3" aria-labelledby="missingLabel"></div>Referring an empty element via aria-labelledby
This tooltip references an empty element via aria-labelledby, which doesn’t provide a name.
<div id="emptyLabel"></div>
<div role="tooltip" id="tooltip4" aria-labelledby="emptyLabel"></div>WCAG techniques
Sufficient techniques
- ARIA16: Using aria-labelledby to provide a name for user interface controls
- ARIA14: Using aria-label to provide an accessible name where a visible label cannot be used
Try It Yourself
Using a screen reader
New to screen reader testing, or need a refresher?
Review this article first: Practical guides for using screen readers
- Load the page, open a screen reader.
- Navigate to the interactive element that triggers a tooltip.
- Wait for the tooltip to appear or focus on the element manually.
Expected result: The screen reader announces the tooltip’s accessible name when it appears.
Actual result: The tooltip is visually present but not announced or described.
Inspecting the browser dev-tools
- Open the Accessibility Tree panel.
- Select the tooltip element.
Expected result: The Name field shows the text you provided.
Actual result: If unnamed, Name is empty.
FAQ
How does this issue relate to 4.1.2 Name, role, value?
SC 4.1.2 requires that user interface components have names that can be programmatically determined. If a tooltip lacks an accessible name, assistive technologies cannot convey its purpose or content, violating this criterion.
Why is this issue marked as Serious?
A missing accessible name in a tooltip creates a significant barrier for screen reader users. The tooltip may provide critical instructions or context that becomes completely inaccessible. This impacts usability and compliance across major browsers and assistive technologies.
Standards and Regulations
| Standard | Success Criterion | Reference |
|---|---|---|
| WCAG 2.2 | 4.1.2 Name, Role, Value (A) | For all user interface components, the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to assistive technologies. |
| EN 301 549 | 9.4.1.2 Name, Role, Value | Same as the WCAG text. |