WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
255149
elements with CSS display:contents are not focusable
https://bugs.webkit.org/show_bug.cgi?id=255149
Summary
elements with CSS display:contents are not focusable
L. David Baron
Reported
2023-04-07 07:09:56 PDT
This bug is based on the conclusion in
https://github.com/w3c/csswg-drafts/issues/2632
(and was also discussed a bit in
https://github.com/whatwg/html/issues/1837
). In WebKit, elements with display: contents are not currently focusable, but they should be. This behavior currently matches other browsers. However, I think this behavior is problematic because elements with display:contents are exposed to assistive technology as having their normal roles, and the contract for the meaning of accessibility roles includes support for certain role-specific keyboard interactions which often include focusability. So I think it's important that the exposure to AT (as agreed in the CSSWG in
https://github.com/w3c/csswg-drafts/issues/2355
and I believe implemented in WebKit in
https://bugs.webkit.org/show_bug.cgi?id=243486
) match the focusability, which it currently does not. Steps to reproduce: 1. load
https://cdpn.io/aardrian/debug/NWqbggX
(taken from two of the Gecko/Chromium bugs below) 2. press Option+Tab to cycle through buttons Expected results: focus moves through all buttons (although perhaps no visual indication of focus on the display:contents button) Actual results: focus skips the display:contents button Parallel Chromium and Gecko bugs are:
https://bugs.chromium.org/p/chromium/issues/detail?id=1366037
https://bugzilla.mozilla.org/show_bug.cgi?id=1553549
https://bugzilla.mozilla.org/show_bug.cgi?id=1791648
I have a change to Chromium to fix this (though I haven't merged it yet, partly out of concern for whether other browsers are willing to match):
https://chromium-review.googlesource.com/c/chromium/src/+/3910374
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-04-14 07:10:15 PDT
<
rdar://problem/108048437
>
Adrian Roselli
Comment 2
2023-10-07 13:52:46 PDT
Confirmed this bug persists in Safari 17 (macOS 14).
Adrian Roselli
Comment 3
2023-10-07 14:30:44 PDT
And confirmed the bug persists in Safari TP 180 (Safari 17.4 beta).
Jen Simmons
Comment 4
2023-10-09 09:42:07 PDT
Adrian, this is still "a bug" because the standards questions have not been settled yet. There's not agreement on how browsers should behave. That needs to be decided before any browser can conform to the decisions.
Adrian Roselli
Comment 5
2023-10-09 10:00:32 PDT
Agreed it is a bug (no quotes) and also agree that OP's request for position and standards clarity are blockers. I encourage all browsers (and their representatives in the standards bodies) to settle this so users don't have to wait any longer.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug