-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Darker style focus/hover on active buttons #16154
Darker style focus/hover on active buttons #16154
Conversation
Currently, hovering with mouse or setting focus on a button which is active has same styling as on a non-active button. This results in problems for keyboard users, who set focus on a toggle and activate it, but cannot visually see that their action had any effect. Ditto for mouse users hovering over a toggle and clicking it. This adds an explicit additional style for focus/hover on active buttons. Note that this does not address issues of browser focus remaining on a button after a mouse click (e.g. #13971), as this will likely require extra JavaScript to fix.
Here's a quick before/after for http://getbootstrap.com/javascript/#buttons-single-toggle using keyboard navigation. note the new darker "toggled, focused" style. it's subtle, but makes all the difference (particularly when next to other toggled items, for instance in situations like the checkboxes http://getbootstrap.com/javascript/#buttons-checkbox-radio) |
Btw not really a LESS expert, so my clumsy hacking away can probably be achieved in a far more elegant manner... |
I agree that the problem this addresses is worth trying to fix. If nothing else, it makes some things easier to debug. |
The more fundamental problem of |
Not so sure I like the aesthetics, but I think I understand the desired behavior here. What browser is that with that particular |
The only change here is that toggled AND focused/hovered is a shade darker, and that the border for I didn't touch any of the outline stuff, and that's what BS looks like by default in Chrome/Win. |
Ah, yeah, sorry, was overthinking this. I'm fine with shipping this. It complicates buttons even more than before, but I suppose that's to be expected when accounting for this kind of stuff. |
Darker style focus/hover on active buttons
Currently, hovering with mouse or setting focus on a button which is
active has same styling as on a non-active button. This results in
problems for keyboard users, who set focus on a toggle and activate it,
but cannot visually see that their action had any effect. Ditto for
mouse users hovering over a toggle and clicking it. This adds an
explicit additional style for focus/hover on active buttons.
Note that this does not address issues of browser focus remaining on a
button after a mouse click (e.g. #13971), as this will likely require
extra JavaScript to fix.