<?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>201581</bug_id>
          
          <creation_ts>2019-09-07 07:04:49 -0700</creation_ts>
          <short_desc>AX: HTML menu element should map to role=list</short_desc>
          <delta_ts>2023-05-15 10:39:16 -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 12</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=42074</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>GoodFirstBug, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Scott">scottaohara</reporter>
          <assigned_to name="Anne van Kesteren">annevk</assigned_to>
          <cc>fred.wang</cc>
    
    <cc>tyler_w</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1568878</commentid>
    <comment_count>0</comment_count>
      <attachid>378291</attachid>
    <who name="Scott">scottaohara</who>
    <bug_when>2019-09-07 07:04:49 -0700</bug_when>
    <thetext>Created attachment 378291
test case of menu pattern and ul pattern to verify menus are not exposed the same as unordered lists

Steps to reproduce:

- Open the provided reduced test case.
- Check accessibility mappings to verify that menu is not mapped as a list, though it should be a semantic alternative to the UL element.
- Attempting to navigate to the menu or its child list items with a screen reader will either not work, or the screen reader will try to expose each list item as a separate single item list, depending on the browser and screen reader pairing used.


Actual results:

The menu is not exposed as a list and thus it and the list items within cannot be consistently navigated to, if at all, when navigating by lists or list items when using a screen reader with Firefox.


Expected results:

Per the HTML specification: &quot;The menu element is simply a semantic alternative to ul...&quot;

https://html.spec.whatwg.org/multipage/grouping-content.html#the-menu-element

Since the menu element should be semantically equal to a UL, and is expected to contain LI elements, it should map similarly to a UL element to allow assistive technologies to navigate to understand &amp; navigate to the element and the contained list items.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1568879</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-09-07 07:05:09 -0700</bug_when>
    <thetext>&lt;rdar://problem/55145117&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1765205</commentid>
    <comment_count>2</comment_count>
    <who name="Scott">scottaohara</who>
    <bug_when>2021-05-30 06:57:26 -0700</bug_when>
    <thetext>Re-reviewing this ticket today, I can confirm that Chromium browsers and Firefox correctly expose a &lt;menu&gt; as a list. Webkit still does not have the correct mapping for this element.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887545</commentid>
    <comment_count>3</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2022-07-29 01:13:43 -0700</bug_when>
    <thetext>https://w3c.github.io/html-aam/ also seems to say it&apos;s mapped to list role.

Checking AccessibilityNodeObject::determineAccessibilityRoleFromNode ( https://github.com/WebKit/WebKit/blob/main/Source/WebCore/accessibility/AccessibilityNodeObject.cpp#L262 ) I see:

- &lt;ol&gt; and &lt;ul&gt; are mapped to AccessibilityRole::List;
- &lt;menu type=&quot;toolbar&quot;&gt; tag is mapped to AccessibilityRole::Toolbar ; we&apos;ll need to check/think about this, but the type attribute seems to be obsolete per https://html.spec.whatwg.org/multipage/obsolete.html#attr-menu-type
- other &lt;menu&gt; elements are not handled.

I see Firefox maps to list too: https://searchfox.org/mozilla-central/rev/4a15041348e08fb0d6f5726015c32861e663fbfe/accessible/base/HTMLMarkupMap.h#279

I haven&apos;t checked yet what Chromium does.

Assigning to Sirri.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1893202</commentid>
    <comment_count>4</comment_count>
    <who name="Sirri Celles">scelles</who>
    <bug_when>2022-08-23 02:56:08 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/3571</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1955389</commentid>
    <comment_count>5</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-05-15 02:14:00 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/13872</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1955452</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-05-15 10:39:14 -0700</bug_when>
    <thetext>Committed 264077@main (af6778aa0405): &lt;https://commits.webkit.org/264077@main&gt;

Reviewed commits have been landed. Closing PR #13872 and removing active labels.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>378291</attachid>
            <date>2019-09-07 07:04:49 -0700</date>
            <delta_ts>2019-09-07 07:04:49 -0700</delta_ts>
            <desc>test case of menu pattern and ul pattern to verify menus are not exposed the same as unordered lists</desc>
            <filename>menu.html</filename>
            <type>text/html</type>
            <size>1420</size>
            <attacher name="Scott">scottaohara</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KICA8aGVhZD4KICAgIDxtZXRhIGNoYXJz
ZXQ9InV0Zi04Ij4KICAgIDx0aXRsZT5UZXN0aW5nIG1lbnUgZWxlbWVudDwvdGl0bGU+CiAgICA8
bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNlLXdpZHRoLCBpbml0aWFs
LXNjYWxlPTEiPgogIDwvaGVhZD4KICA8Ym9keT4KICAgIDxkaXYgaWQ9ImFwc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0b24+PC9saT4KICAgICAgICAgIDwvdWw+CiAgICAgICAgPC9kaXY+CiAgICAgIDwvZGl2
PgoKICAgIDwvZGl2PiA8IS0tIC8jYXBwIC0tPgoKICAgIDxzY3JpcHQ+CiAgICAgIHZhciBjb3B5
ID0gZnVuY3Rpb24gKCkgewogICAgICAgIGFsZXJ0KCdpIGNvcGllZCBzb21ldGhpbmcnKQogICAg
ICB9CiAgICAgIHZhciBjdXQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgYWxlcnQoJ3NvbWV0aGlu
ZyB3YXMgY3V0IScpCiAgICAgIH0KICAgICAgdmFyIHBhc3RlID0gZnVuY3Rpb24gKCkgewogICAg
ICAgIGFsZXJ0KCdDbGVhcmx5IG5vbmUgb2YgdGhlc2UgZnVuY3Rpb25zIGFjdHVhbGx5IGRvIGFu
eXRoaW5nLi4uJykKICAgICAgfQogICAgPC9zY3JpcHQ+CiAgPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>