W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2021

Re: [csswg-drafts] [selectors] :focus-visible matches on initial programmatic focus (#5885)

From: Alice via GitHub <sysbot+gh@w3.org>
Date: Mon, 25 Jan 2021 21:54:43 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-767137455-1611611682-sysbot+gh@w3.org>
I updated the [codepen](https://codepen.io/sundress/pen/WNGqobM) to use focusable divs instead of buttons - focusable divs are focused on click in WebKit and Firefox. Now I can see that Firefox shows a focus outline after programmatic focus after a `blur()`, but not if the `blur()` is skipped. (The delay makes no difference in behaviour)

We didn't write the current language into the spec by accident; it was the result of a lot of thought and discussion, for example: https://github.com/WICG/focus-visible/issues/88

A couple of questions to think about:
- Under what circumstances do authors programmatically move focus?
- Why would someone not currently or likely to immediately start using the keyboard want to know what the currently focused element is?

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 25 January 2021 21:54:45 UTC

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