-
Notifications
You must be signed in to change notification settings - Fork 747
Description
My understanding of :focus-visible was that it gave authors access to the existing logic by which browsers style focused elements, so that authors could change that, without adding focus indicators onto things where the browser wouldn't, which is what would happen if they used :focus instead.
However, the spec, and in particular example 38, suggest that authors could write something like:
:focus:not(:focus-visible) {
outline: 0;
}
in order to suppress browser-supplied focus indicators on elements that match :focus but not :focus-visible.
That's very confusing to me, as by my understanding, there should be no such element. The sentence immediately before the example also seems to agree with me.
Maybe that selector is meant as a poor man's @support
for selectors, but it's given what the rest of the example does, it's not needed or useful.
If I'm right, this example is causing confusion and inducing authors to think that they need to use :focus:not(:focus-visible)
to select and suppress undesirable browser styles, which is just not true. In that case, this should be removed from the example.
If I'm wrong, I'd like to understand why, because then the feature no longer makes sense to me.