Focus indicator
A focus indicator is the visible outline around the link, button or field that keyboard users are on, so they can see where they are.
Removing it with `outline: none` is one of the most common accessibility faults; without it keyboard users are lost.Source 1 The CSS `:focus-visible` selector shows the ring for keyboard use and not for mouse clicks, so nobody needs to remove it.Source 2
The ring needs enough contrast against what is behind it, which on dark sections means a light ring.
How Regular approaches it
Regular designs the focus ring as part of each site, light on dark surfaces and dark on light ones, and tabs through every page and form before launch.
BenjaminWeb designer for sustainable and circular businessesSources and further reading
- Understanding Focus Visible, W3Cw3.org
- :focus-visible, MDN Web Docsdeveloper.mozilla.org