[Webkit-unassigned] [Bug 236782] [macOS][selectors] :focus-visible matching on button focused via script (after clicking on a different button)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 29 03:31:19 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=236782

Kai <kai.hollberg at googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kai.hollberg at googlemail.com

--- Comment #3 from Kai <kai.hollberg at googlemail.com> ---
This issue is also happening on iOS (15.4) and not limited to macOS: https://twitter.com/schweinepriestr/status/1508748936252698626

In the video, https://codepen.io/Blondebeard/pen/JjOOgEE showing the outline is imho incorrect, or, to put it neutral, different from other browsers.

Additionally the mentioned test
https://wpt.fyi/results/css/selectors/focus-visible-script-focus-006.tentative.html?label=experimental&label=master&aligned=
or rather
http://wpt.live/css/selectors/focus-visible-script-focus-006.tentative.html
doesn't appear to cover this issue fully, as it PASSes but clearly the behavior is different.

If I understand correctly this is not speced behavior, but I would strongly urge WebKit/Safari to match the other browsers.

---

Because imho the current behavior, esp. because of mobile, blocks the usage of `:focus-visible`. Out of nowhere you have all those focus indicators showing up on mobile because previously using .focus() wasn't an issue but is now after switching to `:focus-visible`, so you'd have for example
- wrap `:focus-visible` in a media query only targeting a certain min-with (potentially excluding iPads or small width devices using keyboards)
- not use .focus() on mobile, checking everywhere, potentially rewriting your whole application
- not use `:focus-visible`
All of which are unfavorable options.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220329/33aa8553/attachment-0001.htm>


More information about the webkit-unassigned mailing list