W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2016

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

From: Rob Dodson via GitHub <sysbot+gh@w3.org>
Date: Mon, 14 Nov 2016 17:39:56 +0000
To: public-css-archive@w3.org
Message-ID: <pull_request.opened-93612466-1479145194-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:05 UTC