What is the reason default buttons do not display outline styles when clicked, while custom buttons do show an outline style on click?
Is it possible to remove the outline styles from a custom button on click while maintaining the outline styles when users navigate to it using the keyboard (similar to default buttons)?
.btn {
display: inline-block;
padding: 12px;
background: cyan;
border: none;
}
<div>
<button type="button">Why are there no outline styles on click?</button>
</div>
<div style="margin-top: 24px">
<button class="btn">Why do outline styles appear on click?</button>
</div>
UPDATE: I am unable to use outline: none for accessibility reasons. Reference: