-
-
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
V4.beta Dropdown menu focus/hover style constrast too low for accessibility #23329
Comments
/CC @patrickhlauke |
Our current workaround is to darken the background via .dropdown-item:focus,
.dropdown-item:hove {
/* @See https://github.com/twbs/bootstrap/issues/23329 */
box-shadow: inset 0px 0px 400px 110px rgba(0, 0, 0, .09);
}
.dropdown-item.active {
box-shadow: initial;
} |
you can also use the following variables: $dropdown-link-hover-color: #fff;
$dropdown-link-hover-bg: #f00; |
@browner12 While this suggestion is so nice, libraries like BootstrapVue just try to abstract bootstrap components (I mean not providing a pre-compiled BS css by default) and currently shadow hack tries to override user ones which is not a perfect solution. Maybe we can change variables for bootstrap defaults as an accessibility enhancement :) |
agreed, having a more contrasting default would be good. |
See #23990 for a partial fix for this. |
@patrickhlauke Does this also address button focus styling? It is possible to mix buttons and links together in the same dropdown, and they should both look the same to the user |
Is there any news about it? |
This applies to v4 and v5. Would |
for keyboard users, focus styles now don't suppress the outline (per #23990). i'd still say that for sighted mouse users, the overly subtle change in background is practically invisible as it currently stands. changing from Current using Changed to the dark dropdown variant looks, subjectively, good to me as it is. |
general button focus styling is still a bit on the low contrast side. but specifically for dropdowns, yes you can mix and match links/buttons and i think they look the same styling-wise now |
PR for the change to |
The current
:focus
/:hover
styling is almost impossible to see (on some screens) as it is a very subtle change.I would recommend that the background be darkened slightly to make it better for keyboard-only users to know which
.dropdown-item
they have highlighted.In this screen shot, I have
Another Item
focused, and at quick glance (without straining my eyes) I can't tell which menu item is focused:Doing the same thing, but adjusting the background color from
background-color:#f8f9f8
tobackground-color:#e8e9e8
makes a big difference in being able to tell which menu item has focus:The text was updated successfully, but these errors were encountered: