Level AAOperable
2.4.7

Focus Visible

The element you've Tabbed to must show a clear focus outline, so keyboard users can always see where they are.

In plain English

A keyboard user’s cursor is the focus outline. It is the only way they can tell which button or field they are on. Take it away and using the site by keyboard is like typing with the screen off.

Yet the single most common accessibility mistake is outline: none in the CSS, added because the default outline looked “ugly”, with nothing put back in its place. This rule says: the focused element must always show a clear indicator.

Who this is for

  • Keyboard users, who rely entirely on the outline to know their position.
  • People with attention or memory differences, who lose their place without a clear visual anchor.

What “good” looks like

Keep a visible indicator, and make it strong. A custom one is fine, as long as it is clearly visible.

/* Good: a clear, high-contrast focus ring */
:focus-visible {
  outline: 2px solid #1b4dff;
  outline-offset: 2px;
}

/* Bad: the classic offender, with no replacement */
:focus { outline: none; }

Where stores get it wrong

Themes that strip outlines globally with outline: none, focus rings so faint they fail contrast (which also touches non-text contrast), and custom buttons that never show any focus state. It is a top entry on the common failures list.

How to meet it

Techniques the W3C accepts as sufficient (summarized). Follow a link for the full method.

Common mistakes

Patterns the W3C lists as failures of this criterion. Avoid these.

Frequently asked questions

What does focus visible require?+

Success Criterion 2.4.7 (Level AA) says any keyboard-operable interface must show a visible focus indicator on the element that currently has focus, so people can see where they are as they Tab through the page.

Why do sites remove the focus outline?+

Designers often dislike the default outline and add outline:none to remove it, without adding a replacement. That leaves keyboard users with no idea where they are on the page, which fails this criterion. If you remove the default, you must add your own visible indicator.

How visible does the focus indicator need to be?+

It must be clearly perceptible. WCAG 2.2 also added stronger requirements (2.4.11 Focus Not Obscured and 2.4.13 Focus Appearance) about the indicator not being hidden and being large and contrasty enough, but at minimum, under 2.4.7, it must be visible.

Reference

This is a plain-language explainer. The authoritative source is the W3C Web Content Accessibility Guidelines (WCAG) 2.2.

WCAG 2.2 © W3C. Excerpts are paraphrased; see the linked documents for the normative text.

Not sure if your store passes 2.4.7?

A human auditor checks this and every other criterion against your live store, and documents the result.

Book an audit