Find the full post on fotis.xyz
:focus-visible is a standard way of only showing focus styles for keyboard and focus-based modalities. When using it, however, you must take care to not remove :focus altogether, where :focus-visible is not supported.
With CSS, we can achieve progressive enhancement of :focus to :focus-visible:
/* Styles where only focus is supported */
button:focus,