Check the focus indicator on every control in an AI-designed interface is visible on keyboard focus and contrasts at least 3:1 with what is next to it. Move through the page with the keyboard, stop on each control in turn, and write down what the ring looks like, or whether any ring appears at all.
A missing or faint focus ring leaves keyboard users lost. The W3C page for this rule states why it matters: “Without a focus indicator, sighted keyboard users cannot operate the page.” The same page lists a common failure: styling element outlines and borders in a way that removes or renders non-visible the visual focus indicator.

What counts as passing
Two W3C rules shape this check. Success Criterion 2.4.7 Focus Visible states that any keyboard operable user interface has a mode of operation where the keyboard focus indicator is visible, and the indicator must not be time limited: when the keyboard focus is shown, it must remain visible. Success Criterion 1.4.11 Non-text Contrast states that visual information required to identify user interface components and states has a contrast ratio of at least 3:1 against adjacent colours, and the focus indicator must have sufficient contrast against the adjacent background when the component is focused.
The W3C pages give two worked examples for a ring on a white page: a grey ring of #949494 against white, with a contrast ratio of 3:1, passes, while a yellow ring of #FFFF00 against white fails. This check is about the visible ring itself, not about the order controls are reached in; tab order is a separate check.
The practice design and the check table
Use a fictional order page for the exercise. The fictional brand is Maple Corner, a small cafe at 12 Maple Lane that does not exist. Its order page has six controls, and each row below records the focus ring shown when that control receives keyboard focus. Nothing in the table comes from a real client design.
How the ratios in the table were worked out
Each ratio was calculated from the two hex colours with the WCAG relative-luminance formula, (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter colour’s relative luminance and L2 is the darker colour’s. The calculation was done by hand in a short script, not by guessing from how the pair looks. The 3:1 mark from Success Criterion 1.4.11 is the pass mark for every row.
| Control | Focus ring colour | Background | Contrast ratio | Result |
|---|---|---|---|---|
| Order button | #008000 | #FFFFFF | 5.14:1 | Pass — dark green ring clearly darker than the white page. |
| Menu link | #FFFF00 | #FFFFFF | 1.07:1 | Fail — pale yellow ring almost matches the white page. |
| Email field | #949494 | #FFFFFF | 3.03:1 | Pass — grey ring meets the 3:1 mark. |
| Search button | No ring; outline removed, no replacement | #FFFFFF | No ring | Fail — no indicator appears at all when the button receives focus. |
| Help link | #E8A33D | #FFFFFF | 2.16:1 | Fail — gold ring below the 3:1 mark. |
| Close button | #005FCC | #FFFFFF | 5.98:1 | Pass — blue ring clearly darker than the white page. |
Read the table row by row. Three controls pass and three fail, and the failures are three different defects: the menu link has a ring too pale to see, the help link has a ring below the 3:1 mark, and the search button has no ring at all. The email field shows how close a pass can be: at 3.03:1 it clears the mark by very little, so a small change to either colour could push it below.
How to fix a failing row
Never remove the ring without a replacement
If the default outline is removed, supply an author-made indicator in its place. In the practice table, the search button needs a visible ring added back before anything else.
Pick a ring colour that reaches 3:1 on every background it sits on
Check the ring against each background it can appear on, not just the main page. A ring that passes on white can fail on a dark card or a coloured banner.
Use a two-colour ring where one colour cannot contrast everywhere
The W3C lists creating a two-colour focus indicator as a sufficient technique, so that at least one part of the ring contrasts with whatever sits next to it.
Limits
The check covers only the visible focus ring on the six controls listed. It does not cover tab order or whether every control can be reached by keyboard, which is a separate check, and it does not cover the size of the focus area. The ratios apply only to the exact hex pairs listed; changing either colour in a pair means calculating again. Expected result. We checked the W3C Understanding pages for Success Criteria 2.4.7 and 1.4.11. We did not open the Maple Corner order page in a browser.
Sources
- W3C, Understanding Success Criterion 2.4.7: Focus Visible — https://w3c.github.io/wcag/understanding/focus-visible — states that any keyboard operable user interface has a mode of operation where the keyboard focus indicator is visible, that the indicator must not be time limited, and that removing it is a listed failure.
- W3C, Understanding Success Criterion 1.4.11: Non-text Contrast — https://w3c.github.io/wcag/understanding/non-text-contrast — states the 3:1 mark for visual information that identifies a state such as focused, and gives the #949494 pass and #FFFF00 fail examples on white.
