[csswg-drafts] Pull Request: Add :focusring selector

frivoal has just labeled a pull request from robdodson for 
https://github.com/w3c/csswg-drafts as "selectors-4":

== Add :focusring selector ==
Adds support for `:focusring`, related discussion here: 
https://lists.w3.org/Archives/Public/www-style/2016Mar/0250.html

`:focusring` only matches an element if the element is currently 
focused and a focus ring or other indicator should be drawn for that 
element. This is extremely useful for accessibility.

As @tabatkins explained on the mailing list:

> The main benefit of such a thing is that, today, if the default UA 
focus ring style does not work well with your site's theme, you're 
kinda screwed. You can manually write a :focus rule, but you can't 
predict when an element would have a focus ring drawn; you'll 
unfortunately start drawing focus rings when the user mouse-clicks a 
button. Using :focus-ring instead does the right thing automatically, 
triggering your styles only when the UA determines via heuristics that
 it should draw a focus ring.

See https://github.com/w3c/csswg-drafts/pull/709

Received on Tuesday, 15 November 2016 06:55:14 UTC