-
Notifications
You must be signed in to change notification settings - Fork 114
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
Suppress the focus outline on elements that cannot be accessed via keyboard?? #26
Comments
I like the idea as described, but I definitely want to hear from primary keyboard users on this. |
When I suspect the perceived need for this is mainly due to the fact that I too would like to hear from primary keyboard users, but I suspect this is a problem that will heal itself with time. |
According to the
to remove the default focus style only if Google created a focus-visible polyfill; their explainer document details the issues with |
That rule doesn't seem bad, but I don't think it changes anything compared to the browser's default behavior, so I am unsure how helpful it is. |
In the spirit of starting from a place of what we’d do if we were creating CSS today, we wouldn’t add an outline to elements that were never going to get keyboard focus, which is a side effect of
|
right, but browsers don't either, so there's no need to disable a thing they don't do.
|
But browsers do have default styles for
Based on reading the specification and watching Google’s I/O presentation What's new in web accessibility, I’d say there’s more going on than just a new syntax for accessing existing behavior. Because Encouraging future users of CSS Remedy to support a11y in a more future friendly way seems like a good thing. From the spec:
:focus:not(:focus-visible) {
outline: 0;
}
:focus-visible {
outline: 3px solid var(--focus-gold);
} |
:focus:not(:focus-visible) { outline: 0; } The utility of this depends entirely on how browser add support for
Currently there are two partial-support examples to look aat:
It seems like the safest future-proof solution might be adding the example code from the spec - but there is also a good chance it will never be needed. |
In Reboot, the base file for Bootstrap, they have this:
Hmmmmm.
Comments?
The text was updated successfully, but these errors were encountered: