Re: [csswg-drafts] [selectors] :focus-visible and Shadow DOM (#5893)

I don't know why it matches `:focus-visible`, but it's matching it in Chromium implementation.

Checking `:focus-visible` spec there's not any mention to this specifically. The `ShadowRoot` matches `:focus` so it looks like Chromium determines that it also matches `:focus-visible`. From `:focus-visible` spec the only part related to that could be:
> The :focus-visible pseudo-class applies while an element matches the :focus pseudo-class and the user agent determines via heuristics that the focus should be made evident on the element.

I was wondering if the list of suggestions we could include something specifically about this, mentioning that if `ShadowRoot` matches `:focus` because some of their descendants match it, it shouldn't match `:focus-visible`. But maybe you believe this is not needed and every engine can decide what to do here.


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


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

Received on Tuesday, 2 February 2021 06:43:02 UTC