[csswg-drafts] Do we need :focus-visible-within ?

dbaron has just created a new issue for https://github.com/w3c/csswg-drafts:

== Do we need :focus-visible-within ? ==
While looking to close out w3ctag/design-reviews#233, one other thought occurred to me:

Is there a need for `:focus-visible-within` to complement `:focus`, `:focus-within`, and `:focus-visible`?

In particular, because of limitations on CSS selectors (that is, the difficulty of selecting an element that is an ancestor of an element with a particular characteristic), we've added `:focus-within` to have a version of focus that behaves like the hierarchical `:hover` and `:active`.  I think this was desirable because it's not unusual for a visible container to be styled differently when something inside it has focus.  Consider examples ranging from an operating system window to a `<fieldset>` with a bunch of form controls in it.  (I suspect there may be better documentation if you trace from [where we agreed to add `:focus-within`](https://lists.w3.org/Archives/Public/www-style/2014Nov/0553.html).)

It's not clear to me whether the use cases for `:focus-within` and the use cases for `:focus-visible` combine.  Do we also need `:focus-visible-within`, or not?

/cc @alice @robdodson @bkardell @AmeliaBR @frivoal

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3080 using your GitHub account

Received on Tuesday, 4 September 2018 21:27:00 UTC