- Success Criterion 2.4.7
- Conformance level AA
- W3C reference F78
Focus Outline Removed by CSS With No Replacement
2.4.7 — Focus Visible
Scenario
Setting
An online clothing store's product listing page
What’s wrong
CSS removes or hides the focus outline (outline:none / border removal) with no replacement — keyboard users can't see where they are on the page.
Example
.product-card a,
.product-card button {
outline: none;
} Why it matters
A keyboard shopper tabbing through the product grid gets no visual indication of which item or button is currently focused.
How to test
Tab to any element after checking DevTools for outline:none or a removed border with no replacement style: no visible indicator at that stop fails.
How to fix
If the default outline clashes with your design, replace it with an equally visible custom style, never remove it outright.
.product-card a:focus-visible,
.product-card button:focus-visible {
outline: 2px solid #1a56db;
outline-offset: 2px;
} Outcome
A shopper tabs through the grid and always sees a clear outline marking the current product.
Who is affected
Keyboard users and people with low vision lose all sense of position while browsing products.
Learn more
- Understanding Understanding document (opens in a new tab)
- Technique Related technique (opens in a new tab)
Related scenarios
- Element Losing Keyboard Focus the Instant It’s Reached
- Global CSS Reset Removing Every Focus Outline Site-Wide
- Focus Indicator Styled for Some Components but Not Others
- Focus Indicator That’s Just a Subtle, Hard-to-See Color Shift
- Focus Style That Only Appears on Hover, Never on Tab Focus
- Focus Indicator Hidden Behind an Overlapping Sticky Element