WCAG 2.1 · SC 1.4.13
Tooltip
Like toasts, there is no APG pattern — and like toasts, almost every implementation fails the same three requirements.
Saves a copy to your drafts. Nothing is published. Hidden from the list, kept for 30 days, then permanently deleted. Open in a new tab
The third button is icon-only, so its tooltip names it
(aria-labelledby) rather than describing it. The first two
already have names, so theirs describe (aria-describedby).
The three requirements
- Dismissible. Esc hides it without moving the pointer or focus. A tooltip that can only be dismissed by moving away can permanently obscure the content underneath for a screen-magnifier user, who may be looking at a 4× zoom of the exact region the tooltip is covering.
-
Hoverable. The pointer can travel onto the tooltip and
it stays. Hiding on
mouseleavewith no grace period fails this: the tooltip vanishes as the pointer crosses the gap, so a magnifier user can never read a tooltip longer than their viewport. - Persistent. It stays until dismissed, until hover and focus are both gone, or until it stops being valid. No auto-hide timer.
Two more that are not in 1.4.13
Never the title attribute. It cannot be
styled, it appears after an uncontrollable delay, screen readers treat it
inconsistently, and on touch it does not appear at all.
Never anything interactive inside. A tooltip is not focusable, so a link or button in one is unreachable by keyboard. If it needs interaction, it is a popover or a dialog — not a tooltip.
| Tab | Focus the trigger. The tooltip appears immediately, with no delay. |
|---|---|
| Esc | Dismiss, without moving the pointer or focus. |
Tooltips do not exist on touch — there is no hover. Anything essential must be somewhere else as well.