Re: [csswg-drafts] Add :focusring selector

> Reading the "Understanding SC 2.4.7 (Focus Visible)" it's pretty clear the intent of that guideline is to make focus always visible for all users.

That guideline doesn't end up matching reality. Browsers have settled pretty conclusively on, for some types of elements, only visually indicating focus when it's obtained via keyboard.  Requiring people that just want to restyle the focus ring to *also* fundamentally alter their page's UI affordances is not very useful.  If we believed that focus rings should show on *all* focused elements, this should happen at the browser level first for all pages; then `:focus` and `:focus-ring` would just be synonyms that we support for legacy reasons.  Until that happens, letting people just *restyle the focus-ring* and not otherwise alter how/when focus is visually indicated is useful, and that's what `:focus-ring` does.

---

> I think it is great to have this pseudo-class, but the name of it is dumb (no offense).

It was named `:focus-ring` because that matches Moz's name (with fixed hyphen usage), and suggests, in a very clear way and simple way, when it'll match - when the focus ring would normally show up - and what it's intended for - restyling the focus ring.  Any other name attempting to nail down the concept more semantically/abstractly loses this, requiring people to read spec text and grok the distinctions between this and `:focus` more explicitly. That sort of understanding is *useful*, no doubt, but it's not required to use `:focus-ring` correctly.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/709#issuecomment-305584339 using your GitHub account

Received on Thursday, 1 June 2017 18:46:25 UTC