ARIA tooltip elements have accessible names

Tooltips have labels so screen readers can describe their content.

On this page

Impact

ScanGov impact ratings

About

When a tooltip element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn how to name tooltip elements](https://dequeuniversity.com/rules/axe/4.10/aria-tooltip-name).

Risks

Screen readers cannot describe what a tooltip contains.

Why it's important

Ensures assistive technologies like screen readers can correctly interpret and announce page elements to users with disabilities.

User stories

As a screen reader user, I want ARIA attributes to be correctly implemented so that I can understand the purpose and state of interactive elements.

Code

Failing pattern:

<!-- Fail: tooltip element with no content -->
<div role="tooltip" id="tip"></div>

Passing pattern:

<!-- Pass: tooltip contains descriptive text -->
<button aria-describedby="tip">Open in new window
  <div role="tooltip" id="tip">Opens in a new browser tab</div>
</button>

Error

ScanGov messaging when a site fails a standard:

Failed: ARIA tooltip elements have accessible names

Guidance

Indicators

On this page