CSS :focus-visible Playground

Controls on the Balai’s board with your own focus CSS: the browser answers when :focus-visible matches, on Bayu’s Tab and on Wulan’s click, what changed on…

Why it matters

A focus ring is a keyboard user’s GPS. Removing it fails WCAG 2.4.7; showing it on every click makes designers complain. :focus-visible solves both, as long as the indicator has contrast (3:1) and the cascade order does not override it.

The key idea

:focus-visible lights up when the browser judges an indicator is needed

Common mistakes

Try it in this playground