WCAG 2.4.7 Focus Visible
WCAG 2.4.7 Focus Visible explained: keyboard users need a visible focus indicator. What to remove, what to keep, and how to test it by tabbing.
Table of contents
WCAG 2.4.7 Focus Visible is a Level AA success criterion, from WCAG 2.0. This page is part of the WCAG 2.2 success criteria guide. It explains the rule in plain English, who it helps, what passing and failing code look like, and how to test it by hand and with AccessBell, a website accessibility monitoring tool. AccessBell is not an overlay.
What WCAG 2.4.7 Focus Visible requires
Any keyboard operable user interface has a mode of operation where the keyboard focus indicator is visible.
That sentence is the heart of the criterion. The exceptions and notes are in the WCAG 2.2 Recommendation and the Understanding document for 2.4.7 Focus Visible.
What WCAG 2.4.7 means in plain English
When someone moves through a page with Tab, they have to be able to see which control is selected. WCAG 2.4.7 Focus Visible requires a visible keyboard focus indicator. The common failure is a stylesheet that sets outline: none on buttons and links and puts nothing in its place.
The criterion does not specify the color or the thickness. Those details show up in other rules: 1.4.11 Non-text Contrast asks for 3:1 on the indicator, and 2.4.13 Focus Appearance (Level AAA, new in WCAG 2.2) sets a minimum size. 2.4.11 Focus Not Obscured (Minimum) says the focused control cannot be completely hidden under a sticky bar. 2.4.7 is the basic requirement that some indicator exists and can be seen.
Who WCAG 2.4.7 helps
People who use a keyboard because a mouse is painful or impossible, people with low vision who track a highlight rather than a small cursor, and anyone who tabs through a form. Sighted keyboard users are the group this criterion was written for. A screen reader user may not need the outline, but many people who tab can see the screen.
Pass and fail examples
a:focus,
button:focus,
input:focus {
outline: none;
} :focus { outline: none; }
:focus-visible {
outline: 3px solid #1f4b99;
outline-offset: 2px;
} How to test WCAG 2.4.7
- Click the address bar, then press Tab repeatedly through the page. Do not use a mouse.
- On every stop, confirm you can see where focus is: an outline, an underline, a background change or a border that was not there before.
- Open menus, dialogs and the mobile navigation. Tab inside them. Focus that disappears into a dark photo fails.
- If the only indicator is the browser’s default outline, leave it. Do not remove it unless a custom one is at least as visible, including on dark sections.
Testing WCAG 2.4.7 with AccessBell
Automated checks rarely judge 2.4.7 Focus Visible well, because “visible” depends on the colors behind the control. A website accessibility monitoring tool such as AccessBell will list the criterion for manual review when axe-core has no reliable rule. Tab the page. Do not treat a scan with no focus finding as a pass.
Check your site for this with a free scan of one public page. AccessBell is a website accessibility monitoring tool, not an overlay.
Common failures on Shopify, WordPress, Wix and Squarespace
These are patterns in how the builders work. They are not counts from AccessBell scans. Where a platform hosts the screen, a merchant may not be able to change it, and an unscanned page is not a pass.
Shopify
Many themes remove the default outline and add a focus style that only appears on links, not on quantity buttons or payment-adjacent controls in the theme. Tab the header, a product form and the cart drawer on the published theme. The Shopify checker does not replace that pass.
WordPress
Themes and CSS reset stylesheets often include a:focus, button:focus { outline: none; }. Search the theme and any page-builder custom CSS for outline: none and :focus. Restore a :focus-visible style. The WordPress checker can be the automated half of the review.
Wix
Strip backgrounds and slideshows hide a thin focus ring. The Wix checklist notes the limits of the Accessibility Wizard, which does not tab the page for you. Publish, then tab. Use the Wix checker for the issues it can see.
Squarespace
Squarespace’s inclusive design guidance covers a visible focus indicator, and the editor may not let you restyle the outline. The Squarespace checklist says to change the background when the outline disappears into it. Tab the published page, including galleries and form blocks.
Level and conformance
Level AA, in WCAG since 2.0, under Navigable. Required for WCAG 2.2 Level AA. It requires that a visible indicator is available. It does not, at AA, set the indicator’s area or contrast. Pair it with 1.4.11 for contrast of the indicator and with 2.4.11 so a sticky header does not cover the focused item completely.
Conforming at Level AA means meeting every Level A and Level AA criterion that applies, not only the ones labeled AA. See the WCAG 2.2 conformance requirements. This page explains the technical rule. It is not a legal opinion. Read the disclaimer.
Related WCAG criteria
- 2.1.1 Keyboard (Level A, WCAG 2.0)
- 2.4.11 Focus Not Obscured (Minimum) (Level AA, WCAG 2.2)
- 1.4.11 Non-text Contrast (Level AA, WCAG 2.1)
- 2.4.3 Focus Order (Level A, WCAG 2.0)
Every criterion is listed in the WCAG 2.2 success criteria guide.
Frequently Asked Questions
What level is WCAG 2.4.7 Focus Visible?
Level AA. It has been in WCAG since 2.0 and is part of a WCAG 2.2 Level AA target.
Is outline: none always a failure of 2.4.7?
It fails when nothing visible replaces the outline for keyboard focus. Removing the outline and adding a clear :focus-visible style can pass. Removing it and adding nothing does not.
Does 2.4.7 require a 3:1 focus ring?
The 3:1 ratio for the indicator comes from 1.4.11 Non-text Contrast, also Level AA. 2.4.7 requires the indicator to be visible. 2.4.13 Focus Appearance, Level AAA, adds size and contrast rules of its own.
Sources
- W3C: Understanding 2.4.7 Focus Visible (opens in a new tab)
- W3C: Web Content Accessibility Guidelines (WCAG) 2.2 (opens in a new tab)
This page explains a technical standard and is not legal advice. See our disclaimer.