Content on Hover or Focus
Anything that appears on hover or focus — a tooltip, a popover, a dropdown — has to be dismissable without moving the pointer, stay visible while the pointer travels into it, and remain until it is dismissed or stops being relevant.
- Principle
- Perceivable
- Guideline
- 1.4
- Level
- AA
- In WCAG since
- 2.1
- Number
- 1.4.13
Broken, then fixed
The same interface twice: first with the mistake, then with the smallest change that fixes it.
The tooltip vanishes before it can be read or reached.
Estimated total incl. duties
It disappears the instant the pointer leaves the word, so its own text cannot be selected or magnified. Escape does nothing, so a magnifier user has no way to clear it off the screen either.
Hoverable, dismissable, and persistent.
Estimated total incl. duties
The pointer can travel into the tooltip without it closing, Escape dismisses it without moving the pointer, and nothing times it out. All three conditions, not just the popular one.
How to test
Check your own interface against 1.4.13, one step at a time.
- Find everything that appears when you hover over or focus something: tooltips, preview cards, submenus, hints beside form fields.
- Hover over each trigger, then press Escape without moving the mouse. Check the extra content closes. Do the same after moving focus to the trigger with the Tab key.
- Hover over each trigger and move the pointer slowly onto the content that appeared. Check it stays open while the pointer is on it.
- Show each one and wait without moving. Check it stays until you move the pointer or focus away, close it, or it stops being relevant, and does not vanish on a timer.
- Leave out tooltips the browser draws from a title attribute: the browser controls them, so they are exempt.
Common questions
Do title attribute tooltips have to meet 1.4.13?
No. The browser draws them and the author cannot change how they look, so they are exempt.
Does the extra content have to close with Escape?
No, not with that key in particular. People need a way to close it without moving the pointer or focus, and Escape is the usual one.
Does an error message shown on focus have to be dismissible?
No. Content that reports an input error, or that covers nothing else, is exempt from the dismissible part. It still has to stay open while the pointer is over it and until focus leaves the trigger.
Try it yourself
A lab is a small working piece of interface that you change yourself. Read its steps, use the controls under it, and watch the verdict line at the bottom: it says whether the criterion passes or fails as you go. Reset puts it back.
Try it: tame the tooltip
How to use this lab
- Goal. Read the tooltip on the words “incl. duties” without it vanishing or getting in the way.
- The controls. The tick boxes under “The tooltip” give it three behaviours: Escape closes it, The pointer can move into it, and It stays until dismissed. The buttons under “Try to read it” work it with a drawn pointer and keys: Hover the words, Move into the tooltip, Wait five seconds and Press Escape.
- Try this. The lab starts with all three unticked, and fails. Press Hover the words, then Move into the tooltip, Wait five seconds or Press Escape, and see what each does. Then tick all three and try again.
- What it means. With all three ticked, 1.4.13 passes. With any one missing, 1.4.13 fails: someone zoomed in can’t move over to read it, someone who reads slowly loses it to a timer, and someone it covers can’t clear it. The verdict line under the lab says which.
1.4.13 fails
Also in guideline 1.4
Criteria in the same guideline often fail together.
- 1.4.1, PerceivableLevel A
Use of Color
Fails when: Hue is the only signal.
- 1.4.2, PerceivableLevel A
Audio Control
Fails when: Autoplaying audio with no control on the page.
- 1.4.3, PerceivableLevel AA
Contrast (Minimum)
Fails when: Hierarchy built by fading text out.
- 1.4.4, PerceivableLevel AA
Resize Text
Fails when: A fixed-height box clips its own text when enlarged.
- 1.4.5, PerceivableLevel AA
Images of Text
Fails when: A headline exported as an image.
- 1.4.10, PerceivableLevel AA
Reflow
Fails when: Fixed-width columns make the page scroll sideways as well as down at 320px wide.