W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2020

Re: [csswg-drafts] [selectors] :focus-visible on a <select> element (#5822)

From: Emilio Cobos Álvarez via GitHub <sysbot+gh@w3.org>
Date: Wed, 23 Dec 2020 23:55:06 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-750594601-1608767705-sysbot+gh@w3.org>
Hmm, Chrome's behavior seems a bit more subtle. Both browsers match `:focus` at the same time:

```
data:text/html,<style>:focus { outline: 1px solid green }</style><select><option>abc</option><option>def</option></select>
```

But it seems that chrome by default doesn't show outlines if the dropdown is open:

```
data:text/html,<select><option>abc</option><option>def</option></select>
```

But it does match `:focus-visible` (?):

```
data:text/html,<style>:focus-visible { outline: 1px solid green }</style><select><option>abc</option><option>def</option></select>
```

That's very odd and it means that authors can't really accomplish the native behavior. I think Chrome behavior is wrong, it should either not match `:focus-visible` when the dropdown is open, or it should behave like Firefox.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 23 December 2020 23:55:08 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:24 UTC