Always worth repeating: all interactive elements should have a focus style. That way, a keyboard user can tell when they have moved focus to that element.
But if you use
:focus alone for this, it has a side effect that …
Patrick H. Lauke covers the future CSS pseudo class
:focus-visible. We’re in the early days of browser support, but it aims to solve an awkward situation:
… focus styles can often be undesirable when they are applied as a