.action:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }The thick, offset outline remains visible around the button.
LESSON 83 OF 100
Clearly show keyboard focus without removing the indicator.
:focus-visible selects a focused element when the browser determines a visual indicator is useful. An outline does not consume layout space, while outline-offset separates it from the element edge.
.action:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }The thick, offset outline remains visible around the button.
.action:focus { outline: none; }Removing the outline without a replacement can make focus impossible to locate for keyboard users.
For .action:focus-visible, set a 3px solid #f59e0b outline and a 3px outline offset.
The selector follows browser-indicated focus, and the two properties build a persistent, readable ring.
ANALYSIS REQUEST
The initial discussion is without obligation. You receive an honest recommendation, suitable stages and the factors that affect price.