While tabbing through a page of default form elements I noticed the button
and select
elements don't receive the same border styling that certain input
types, textarea
, and the a
tag get while focused.
In this codepen I've tried a series of different types of buttons:
button
elementbutton
element withtype="submit"
&role="button"
button
element withtabindex="0"
span
element withrole="button"
input
element withtype="submit" value="Submit"
None of which receive the browser's default focused styles.
Have these elements always been this way? I'm using Chrome 43.0.2357.124 but Firefox displays the default blue box shadow border. I've always read not to tinker with focus styles with links and form elements for accessibility reasons but these elements don't even have one. How would someone who used those focus states while tabbing through a page know where they're located within that page? I know I can make my own focus styles but shouldn't the browser have them by default?