[Webkit-unassigned] [Bug 225148] [selectors] :focus-visible and keyboard events

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 5 11:54:36 PDT 2021


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

--- Comment #14 from Maciej Stachowiak <mjs at apple.com> ---
WebKit is already set up to not show focus rings for read-only text fields (following macOS platform convention, originally) so it would probably make sense to limit focus ring for arbitrary tabIndex elements to only ones that are contentEditable. But this might be under-inclusive of divs that should receive a focus ring when clicked.

Making a focus ring appear when the user types in an already-focused element seems like a wrong and confusing behavior. The focus ring is supposed to tell the user where their typing will go. So only showing it after the user has typed something already misses the point. We should try to show it right away in places we believe will receive typing, even if the user clicked to focus it in the first place.


However, making this change seems unrelated to the :focus-visible definition in the Selectors spec. The only things it has to say about the keyboard are in non-normative example sections.


Incidentally, perhaps this UA stylesheet rule to suppress drawing a focus ring in some cases should instead be changed to be part of the definition of :focus-visible (and then other UA stylesheet rules should use :focus-visible instead of :focus).

/* Read-only text fields do not show a focus ring but do still receive focus */
html:focus, body:focus, input[readonly]:focus, applet:focus, embed:focus, iframe:focus, object:focus {
    outline: none;
}

-- 
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/20210505/fa71c9aa/attachment.htm>


More information about the webkit-unassigned mailing list