

:focus-visible in WebKit - April 2021
source link: https://blogs.igalia.com/mrego/2021/05/05/focus-visible-in-webkit-april-2021/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

A new report after a new month is gone, you can see the previous ones at:
Again this is a status report about the work Igalia is doing on the implementation of :focus-visible
in WebKit, which is part of the Open Prioriziatation campaign. Thanks everyone supporting this!
There has been some nice progress in April, though some things are still under ongoing discussion.
Script focus and :focus-visible
Finally we decided to reflect the reality in the script focus tests that I created, and merge them on WPT. The ones where the implementations Chromium and Firefox don’t match the agreed expectations (the ones when you click a non-focusable element, and that click moves focus elsewhere), where marked as .tentative
.
So we opened a separated issue to explain the situation and gather more feedback about what to do here.
Once we had the tests I implemented the same behavior as other browsers, the current one reflected on the tests, in WebKit. The patch got reviewed and merged, so script focus and :focus-visible
work the same in all browsers right now.
:focus-visible
and Shadow DOM
The test that checks that :focus-visible
doesn’t match on ShadowRoot
was also merged in WPT. That’s the current behavior on WebKit implementation too. More about this in January’s post.
Implementation details
There was a crash in WebKit due to my initial implementation of script focus, that problem has been already fixed. Also an extra bug was found and fixed too.
On the review of those patches, some new discussion started about different things related to :focus-visible
feature, like why a keyboard input triggers :focus-visible
matching. The discussion with Apple engineers is ongoing on the bug and let’s see how it ends.
Some numbers
Let’s take a look to the numbers again:
- 26 PRs merged in WPT (5 in April).
- 27 patches landed in WebKit (10 in April).
- 9 patches landed in Chromium (2 in April).
- 2 PRs merged in CSS spcs.
- 1 PR merged in HTML spec.
Next steps
Implementation is mostly over, now the goal is to close the discussions with the different parties and check the possibilities of shipping this in WebKit.
Thanks everyone that has provided input in the different discussions and jumped on the patches review. Your feedback has been really useful to keep moving this forward.
Stay tuned!
Recommend
-
10
:focus-visible in WebKitFunding the implementation priority for :focus-visible in WebKit
-
10
:focus-visible in WebKitLet’s do a small introduction as this is a kind of special post. As you might already know, last summer Igalia launched the Open Prioritization experime...
-
13
Member mrego commented
-
9
222028 – [selectors] :focus-visible implementation Status: RESOLVED FIXED
-
10
224598 – [selectors] Script focus and :focus-visible Status: RESOLVED FIXED
-
8
:focus-visible in WebKitAnd again this is a new report about the work around :focus-visible in WebKit, you can check the previous ones at: As you might already know this work is part of the
-
10
Another month is gone, and we are back with another status update (see January and
-
5
:focus-visible in WebKitOne month has passed since the previous report so it’s time for a status update. As you probably already kn...
-
6
The path of bringing :focus-visible to WebKit Talk about :focus-visible at CSS Conf Armenia 2021....
-
12
:focus-visible is shipping in Safari/WebKit Finally :focus-visible has been enabled by def...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK