Bug 226918

Summary: AX: CSS list-style influences role/semantics
Product: WebKit Reporter: Jeff Smith <jeff.smith>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: jcraig, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: iPhone / iPad   
OS: iOS 14   

Description Jeff Smith 2021-06-11 06:00:06 PDT
When a UL element is provided with "list-style: none" in CSS, the semantics of the UL element are removed. The UL is not announced as a list by VoiceOver, it's announced as a group of text.

Example: https://codepen.io/jeffsmith/pen/oNZPXGz

Three UL elements are provided in this example:

* The first is a standard UL with no CSS styling.
* The second is a standard UL, with a class added to provide "list-style: none" styling for the list.
* The third is similar to the second, with the explicit role="list" added to the UL element.

The first list is announced as expected, the second and third are announced as a group of text. Presentational elements (CSS) should not be in a position to be influencing the semantics of HTML and how a screen reader announces those semantics.
Comment 1 Radar WebKit Bug Importer 2021-06-11 06:00:20 PDT
<rdar://problem/79194628>
Comment 2 James Craig 2021-08-10 17:36:28 PDT
Accidentally closed without comment. Standby while I find the link.
Comment 3 James Craig 2021-08-10 17:41:48 PDT
Here's the explanation thread... 
https://twitter.com/cookiecrook/status/1337226933822603270