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

robdodson has just submitted a new pull request for 
https://github.com/w3c/csswg-drafts:

== 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 Monday, 14 November 2016 17:40:03 UTC