-
-
Notifications
You must be signed in to change notification settings - Fork 835
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
[A11Y] Side nav items have no keyboard focus styles #2656
Comments
For this specific case, i.e dropdown menu items (yes the sidebar is actually a dropdown component), couldn't we just remove the CSS block that disables the outline on focus ? Browsers should automatically have an outline on focus I believe .Dropdown-menu>li>a:focus, .Dropdown-menu>li>button:focus {
outline: none;
} |
@SychO9 That would work for this specific case, but implementing something like this could be good for establishing a consistent (and themed) a11y outline which could be used on other elements and in extensions. Take a look at the tags page -- the default outline in Chromium browsers (at least for me) seems a bit weird on that page, with outlines appearing partly behind some elements and in front of others. Some exts may want to include other elements or custom buttons/elements which also need a focus outline, so this would allow them to use the same outline as core |
Seems like it's due to the fact that the anchors have absolute positioning, I can't wait until we switch to flexbox/grid (#848)
That's a good point, I like the idea of it. So to sum it up, what we want to do is:
Right ? |
Oh god yes, it couldn't come any sooner! That all sounds great! I have made the mistake of applying outlines on |
Related: #2814 |
Moved milestone to PR. |
Bug Report
Current Behavior
Most side nav items are missing keyboard focus-ring styling which makes it almost impossible to tell if they are focused.
Possible solution
There are a few different approaches that could take place.
.addAccessibilityFocusRing()
mixinA mix-in would allow for re-use throughout core and extensions, providing the most open solution possible.
I was working on implementing this on giffgaff's theme, but it might be better suited to the core repo instead (modified to fit core's styling, of course!)
Environment
The text was updated successfully, but these errors were encountered: