Skip to main content
Perceivly: Perceivly home

Focus visible

Also called: Focus indicator, Focus ring, Focus outline

A visible indicator, such as an outline, that shows which element currently has keyboard focus.

Definition

WCAG 2.4.7 Focus Visible, Level AA: any keyboard operable user interface has a mode of operation where the keyboard focus indicator is visible.

WCAG 2.2 adds two related criteria. 2.4.11 Focus Not Obscured (Minimum), Level AA, requires that a focused element is not entirely hidden by author-created content such as a sticky header or cookie banner. 2.4.13 Focus Appearance, Level AAA, sets a minimum size and contrast for the indicator.

Why it matters

For a keyboard user, the focus indicator does the job of the mouse pointer. Without it they cannot tell which link Enter will follow. The most common cause is CSS like *:focus { outline: none; } added to hide the browser's default ring, with nothing to replace it.

How to test or meet it

  • Never remove the outline without a replacement. Style :focus-visible instead, so mouse clicks don't show the ring but keyboard focus does.
  • Make the indicator clear against every background it appears on; a 2px solid outline with an offset is a good default.
  • Check that sticky headers, footers and chat widgets never cover the focused element.

Automated tools cannot reliably tell whether focus is visible, so this is a manual test: tab through each page and make sure you can always see the focus.

WCAG criteria

Sources

  1. Understanding 2.4.7 Focus Visible (W3C)
  2. Understanding 2.4.11 Focus Not Obscured (Minimum) (W3C)

By the Perceivly team · Published . This explains a term; it is not legal advice.

Check a page for free

The free accessibility checker tests one page against WCAG 2.2 A and AA in about 10 seconds and lists what still needs a manual review. No sign-up.

All glossary terms