[Webkit-unassigned] [Bug 255149] New: elements with CSS display:contents are not focusable

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 7 07:09:56 PDT 2023


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

            Bug ID: 255149
           Summary: elements with CSS display:contents are not focusable
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: dbaron at dbaron.org

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

-- 
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/20230407/5fc3388d/attachment.htm>


More information about the webkit-unassigned mailing list