Re: [csswg-drafts] [selectors] `:focusable` pseudo-class (#7269)

> My (perhaps naive) expectation is that it would mean whatever is necessary so that if I called the `focus` method on a node that matches `:focusable` that element would then become the `document.activeElement`.

That would imply that something that was `display:none` wouldn't be returned by querySelector though right? In CSS, with that definition you could easily write "if you're focusable be hidden" (which makes you not match that definition of focusable)... But also, you can set the focus to any element if it is overflowed, and the rule could say "don't overflow".  I feel like we'd need something a little more explicit and nuanced.  It _could_ be a simple alias, it's just that you'd need to know a lot more to use it because the candidates wouldn't actually tell you if they were focusable, necessarily, maybe.


-- 
GitHub Notification of comment by bkardell
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7269#issuecomment-1124021395 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 11 May 2022 17:01:39 UTC