<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>259487</bug_id>
          
          <creation_ts>2023-07-25 10:28:39 -0700</creation_ts>
          <short_desc>AX: Unstyled lists with multiple children have list semantics removed</short_desc>
          <delta_ts>2023-11-03 14:59:23 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Accessibility</component>
          <version>Safari 16</version>
          <rep_platform>All</rep_platform>
          <op_sys>macOS 13</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Diane Ko">kodiane</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andresg_22</cc>
    
    <cc>aroselli</cc>
    
    <cc>jcraig</cc>
    
    <cc>kodiane</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1968068</commentid>
    <comment_count>0</comment_count>
    <who name="Diane Ko">kodiane</who>
    <bug_when>2023-07-25 10:28:39 -0700</bug_when>
    <thetext>WebKit removes the semantics of lists whenever the list styling is removed. In a tweet from James Craig (https://twitter.com/cookiecrook/status/1084142936583892992), the heuristics for a list are defined in AccessibilityList.cpp (https://github.com/WebKit/webkit/blob/main/Source/WebCore/accessibility/AccessibilityList.cpp#L137-L143):
1. If it&apos;s a named list, like ol or aria=list, then it&apos;s a list.
  1a. Unless the list has no children, then it&apos;s not a list.
2. If it displays visible list markers, it&apos;s a list.
3. If it does not display list markers and has only one child, it&apos;s not a list.
4. If it does not have any listitem children, it&apos;s not a list.
5. Otherwise it&apos;s a list (for now).

This would imply from the heuristics that an unstyled list that has more than one child should be considered a list. However, in the actual code logic, this isn&apos;t the case.

It seems like either the heuristics in the code comment are incorrect or the logic to match those heuristics is incorrect. As I generally agree with the heuristics in the code comment, it would be great to have the code match the written heuristics. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1968069</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-07-25 10:28:49 -0700</bug_when>
    <thetext>&lt;rdar://problem/112843417&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1987413</commentid>
    <comment_count>2</comment_count>
    <who name="Adrian Roselli">aroselli</who>
    <bug_when>2023-10-25 08:14:21 -0700</bug_when>
    <thetext>Statement from Apple Safari rep:

&gt; Also, at the moment, we don&apos;t believe https://bugs.webkit.org/show_bug.cgi?id=259487 is a report of a bug, but rather a (handy) report that the comment is out of date. We&apos;re looking into it, so aren&apos;t 100% sure yet... more later... but meanwhile, it does not look like this is an issue for Interop 2024 — especially since how precisely screenreaders are to handle lists is not standardized. Perhaps it should be, but that&apos;s another thing to discuss outside the Interop 2024 Focus Area proposal process.

https://github.com/web-platform-tests/interop/issues/512#issuecomment-1778254874

I can assure you that some authors (and users) consider this a bug.

If Apple can issue that statement on an unrelated issue, can we get clarity here on this specific bug report from an Apple rep?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1987863</commentid>
    <comment_count>3</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2023-10-26 16:26:18 -0700</bug_when>
    <thetext>I wrote the original tests cases for the patch https://bug-134187-attachments.webkit.org/attachment.cgi?id=233587 

And wrote extensively on reasons for the change before and after this thread.
https://twitter.com/cookiecrook/status/1337226933822603270

And I&apos;m confident that the bug is an and/or transposition in the comment, not a bug in the implementation. 

We discussed the fix should be:

```diff
- 3. If it does not display list markers and has only one child, it&apos;s not a list.
+ 3. If it does not display list markers or has only one child, it&apos;s not a list.
```

and to intersperse the individual step comments with each respective block, so that it&apos;s less likely to get out of date in the future... 

In particular, this change https://webkit.org/b/193382 (UL in NAV should retain list heuristic) was was fixed, but wasn&apos;t added to the preceding comment block.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1987873</commentid>
    <comment_count>4</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2023-10-26 17:46:45 -0700</bug_when>
    <thetext>More comments were already interspersed. Corrected that typo other editorial changes.

https://github.com/WebKit/WebKit/pull/19616/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1987874</commentid>
    <comment_count>5</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2023-10-26 17:49:13 -0700</bug_when>
    <thetext>Thanks Diane, for catching that the comment didn&apos;t match the implementation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1989824</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-11-03 14:59:18 -0700</bug_when>
    <thetext>Committed 270206@main (b503c374a46e): &lt;https://commits.webkit.org/270206@main&gt;

Reviewed commits have been landed. Closing PR #19616 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>