WCAG Encyclopedia

1.4.13 · PerceivableLevel AA

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.

Broken: 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.

Fixed: 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.

  1. Find everything that appears when you hover over or focus something: tooltips, preview cards, submenus, hints beside form fields.
  2. 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.
  3. Hover over each trigger and move the pointer slowly onto the content that appeared. Check it stays open while the pointer is on it.
  4. 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.
  5. 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

  1. Goal. Read the tooltip on the words “incl. duties” without it vanishing or getting in the way.
  2. 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.
  3. 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.
  4. 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.
The tooltip
Try to read it
No tooltip is open.

1.4.13 fails

Also in guideline 1.4

Criteria in the same guideline often fail together.