Skip to content
Search topics

Focus rings too thin or faint to spot

A 1-pixel, pale blue outline technically shows focus, but it is too small and too close to the page colour to find at a glance.

SC 2.4.13AAA Markdown for agents
Broken
Focused, if you look hard.
The accessibility problem illustrated.
01

The problem

People with low vision can't find a focus ring that is a pale hairline.

02

Try it

Press Tab and try to spot the focused button.

Press Tab to move through the buttons on the white page and the navy banner.

Broken Can you fix this?

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Draw the indicator at least 2px thick, with 3:1 between its focused and unfocused colours.

  1. 1The indicator is at least as large as a 2px ring around the control.
  2. 2Its changed pixels have 3:1 against what they replace, on every surface.
  3. 3An outline stays in forced colors, even when the main cue is a shadow or a fill.
Before A hairline ring
.brand-button:focus-visible {  outline: 1px solid #a8c7fa;  outline-offset: 2px;}
After

A solid 2px ring for each surface

.brand-button:focus-visible {  outline: 2px solid #1a5fb4;  outline-offset: 2px;}/* On the navy banner, the blue would be 2.45:1, so switch to white. */.banner .brand-button:focus-visible {  outline-color: #fff;}

04

Verify the fix

5 checks, no mouse.

Test with: Contrast measurement, Keyboard, Zoom, Forced colors

0 of 5 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the shared theme or component styles change.

Limits

2.4.13 is a AAA criterion, so most conformance targets don't require it. It is still the clearest test of whether focus is easy to see, and a ring that passes it also passes 2.4.7 and the focus part of 1.4.11. The colours here are examples; measure your own. Test the complete journey on your real surfaces.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work