Most teams never see their focus ring. Designers click. Developers click. QA clicks. The ring appears only when someone navigates by keyboard, which means the people who ship the interface are usually the least likely to notice that it is broken.
We audited the keyboard state of our own production site (designdensolutions.com) this week. Not with an automated scoring tool — with the actual CSS that ships, the WCAG non-text contrast formula, and a count of every element a keyboard visitor can land on. Here is the method, the numbers, and the patterns worth copying.
What "visible" actually means
A focus indicator has to do one job: show which control will receive the next keypress. WCAG splits that into two requirements:
- SC 1.4.11 Non-text Contrast (AA) — visual information needed to identify UI component states must reach 3:1 against adjacent colours.
- SC 2.4.13 Focus Appearance (AAA) — the indicator must be at least as large as a 2px thick perimeter of the component, and its change between focused and unfocused states must reach 3:1.
Two consequences people miss: contrast is measured against whatever the indicator sits on (white, off-white, a grey card, a dark nav — all different), and "we have a ring" is not the same as "the ring clears the bar where it is drawn".
What we measured
Method: fetch the live HTML and both stylesheets, enumerate every :focus / :focus-visible rule, then compute WCAG 2 relative luminance for the ring against each surface it is drawn on. No browser extensions, no scoring service — the code below is the whole measurement.
Our ring is 2px solid #ff5200 with a 3px offset on links and buttons, 4px on the mobile brand link, and 1px on form fields. Measured against the surfaces it actually sits on:
| Surface | Hex | Ring contrast | 3:1 floor |
|---|---|---|---|
| Page background | #ffffff | 3.25:1 | passes by 0.25 |
| Soft section | #F7F7F5 | 3.03:1 | passes by 0.03 |
| Border grey | #EAEAEA | 2.70:1 | fails |
| Dark footer/nav | #111111 | 5.81:1 | passes |
The primary ring technically passes on our two light backgrounds. It has almost no headroom: a quarter of a point on white and three hundredths on the soft section. The moment a control sits on the grey border token, it fails.
The bigger problem: three controls remove the outline
Our stylesheet sets outline: none on three focus states and replaces it with brand styling:
- Menu toggle — border becomes
rgba(255,82,0,0.55)plus a glow and a 1px lift. - Mobile close — border/background swap only.
- Mobile nav links — orange label plus a 10% orange row tint.
The menu toggle is the clearest failure. Its border composites over the dark nav to #943508, which measures 2.49:1 against #111111 — below the 3:1 floor. Over white the same 55% orange composites to #ffa073 and scores 1.99:1. The state is technically different from default; it is not reliably perceivable. That is the trap: removing the browser outline feels safe because a designer-added effect remains, but focus visibility is a contrast requirement, not a "something changed" requirement.
How many chances to get it wrong
A static count of focusable elements on four pages: homepage 69, web development 63, branding 63, contact 65. Roughly 65 opportunities per page for a keyboard user to lose their place. Compliance tools often report "focus indicator present" and move on; a human tabbing through the page is the only check that measures the experience.
The measurement code
const lin = c => { c /= 255; return c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4; }; const lum = hex => { const h = hex.replace('#', ''); const [r, g, b] = [0, 2, 4].map(i => parseInt(h.slice(i, i + 2), 16)); return 0.2126 * lin(r) + 0.7152 * lin(g) + 0.0722 * lin(b); }; const contrast = (a, b) => { const [hi, lo] = [lum(a), lum(b)].sort((x, y) => y - x); return (hi + 0.05) / (lo + 0.05); }; contrast('#ff5200', '#ffffff'); // 3.25 contrast('#ff5200', '#F7F7F5'); // 3.03 contrast('#ff5200', '#EAEAEA'); // 2.70 Run it against every surface token you own, not just page white. If your design system has soft sections, tinted cards or grey dividers, those are surfaces. outline-offset makes the gap part of the presentation: with a 3px offset on a 2px ring, the ring is drawn on the parent background, so that is the colour to test.
What we are changing
- Keep a real outline. Use
#b83b00on light surfaces: 5.73:1 on white and 5.34:1 on#F7F7F5. On dark surfaces the brand orange already scores 5.81:1. - Never delete the outline without a measurable replacement. If you must restyle, keep at least a 2px perimeter at 3:1, and verify the composite colour, not the alpha value.
- Test forced-colours mode. Windows High Contrast can drop custom indicators; a transparent outline that becomes visible under
forced-colors: activeis a cheap safety net. - Tab through the page once per release. Not a screenshot, not an automated pass — the keyboard itself, at 200% zoom, including the sticky header.
One honest limit: these are computed CSS values, not measurements of any particular office monitor. We did not test the ring on cheap panels, in sunlight, at low brightness. We measured what the stylesheet guarantees; if that guarantee is 3.03:1, the display only has room to make it worse. A ring that clears the floor by three hundredths is not a design decision, it is a rounding error.
If you want a second pair of eyes on the keyboard path through your own site, our web development team in Mohali can run the same audit: website development services.
Article and image prepared with AI assistance and reviewed for accuracy by Design Den Solutions. Design Den Solutions, Mohali — +91 98721 90965 — www.designdensolutions.com


