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
[selectors-4] Rename :focus-ring #2036
Comments
:focus-ring
to :focus-indicator
:focus-ring
to :focus-indicator
A couple of comments on the status quo regarding focus indicators in general:
|
http://output.jsbin.com/kijafe/1 demonstrates the difference between |
Just wanted to add that Alice and I have been talking about adding this to the agenda since the week before TPAC, I 100% support this. Just to add briefly: The fact that ':focus-ring' isn't necessarily a ring, nor does it necessarily have a 100% standard 'thing' that it does (some people use border, some people use backgrounds, certain things indicate just fine without) has been confusing, in actual practice, for a number of authors and testers I've encountered. In all cases this was resolved by pointing to existing documents explaining that it is really a focus indicator we're interested in. |
I have no strong opinion, but since there is a call to rename, I'll add my two cents to the discussion and propose Or, maybe |
What about I agree with the criticisms about
I don't like I also like the idea that a proper focus indicator (in some form) is needed when this pseudoclass is active. In contrast to the broader |
I don't like
|
Matching existing terms in other existing recommendations, documentation and training seems like a big win to me. I don't think that saving 2 characters is a great reason to choose |
In previous discussions with Alice, I objected to :focus-indicator, because it's just a more generic version of the existing term and thus presumably falls to the same confusion about "is this styling the focus ring itself?" - you can still ask "is this styling the focus indicator itself?" Switching to a state-based name, like :focus-visible, addresses that concern, so 👍 . (It's also slightly simpler to spell, so yay.) |
It sounds like there is consensus on Any objections? I'm happy to send a patch to the spec if not. cc @robdodson (edited to remove joking editorialising in case it was misinterpreted. I think it's a good name.) |
I agree it is better than |
@bkardell does this help?
Addendum: Names only to be used when joking
|
@alice To be clear: I am 100% fine with the rationale of the group if the choice is |
+1 for focus-visible, with focus-shown and :focus-indicated as acceptable second choices. |
The Working Group just discussed
The full IRC log of that discussion<dael> Topic: [selectors-4] Rename :focus-ring to :focus-indicator<dael> github: https://github.com//issues/2036 <dael> bk <dael> bkardell_: I can represent <dael> bkardell_: :focus-ring is what the mozilla folks used on early prefix impl. When we said we'd adopt we carried the name, but most doc use a different name and it's frequently not a name. In practice the name was confusing. WE proposed focus-indicator which matches most doc, but there were worried that sounded more like a psuedo element <dael> TabAtkins: once of the obj from Alice to focus-ring is people think it's a pseudo element styling the ring and if that's the confusion then focus-indicator just genericises the noun since we name the thing shown not the quality of the element. <dael> bkardell_: That's a fair other observation. I think focus-visible is what people on GH seem to have gathered around and there's a standing pull request with that. <dael> Rossen_: So I guess the current runner is focus-visible <tantek> I reviewed https://github.com//issues/2036 and :focus-visible makes sense to me per Tab's arguments about noun/thing vs. state of thing <dael> bkardell_: Yes and there's an outstanding PR so we can just accept that. <dael> Rossen_: I'm sad focus-focus isn't it, but focus-visible is good. <fantasai> wfm <dael> TabAtkins: I'm fine with focus-visible <dael> Rossen_: Other opinions? <tantek> s/focus-focus/focus-pocus <dael> RESOLVED: change the name to :focus-visible |
https://drafts.csswg.org/selectors-4/#the-focusring-pseudo
:focus-indicator
does not carry this semantic baggage.Furthermore, the phrase "focus indicator" is used in WCAG guidelines, creating a semantic link between these two notions.
The text was updated successfully, but these errors were encountered: