How can I make keyboard focus visible on controls with different backgrounds?
Quick answer
Test every keyboard-focusable component in its unfocused and focused states, including hover, selected, and unselected appearances, on each relevant background. Record where the indicator blends in or is difficult to distinguish. A two-color indicator is one possible approach for varied backgrounds, but judge the implemented result in context. WCAG 2.2’s Focus Appearance criterion is Level AAA, not the AA minimum.
The question, the details, the next step.
A practical checklist
List keyboard-focusable components and the backgrounds on which each appears.
Create separate rows for normal, hover, selected, and unselected states where applicable.
Compare each control’s focused appearance with its unfocused appearance.
Record exactly where an indicator blends in or becomes difficult to notice.
Retest affected combinations after a design change; treat a two-color indicator as an option, not a guarantee.
A few more useful answers
Is the WCAG 2.2 Focus Appearance criterion an AA requirement?
No. The cited Focus Appearance criterion is Level AAA. Do not describe it as the AA minimum. [S1]
Does using a two-color indicator guarantee conformance?
No. W3C Technique C40 describes one informative approach, not a standalone guarantee. Assess the implemented indicator in context. [S2]
Should I review a selected control as well as an unselected one?
Yes. Include both when the component has those states, because its focus appearance should be reviewed across selected and unselected appearances. [S1]
Sources
References used for this guide.
- [S1] Understanding WCAG 2.2: Focus Appearance w3.org · Checked
- [S2] W3C Technique C40: Two-color focus indicator w3.org · Checked
