RESOLVED FIXED 201581
AX: HTML menu element should map to role=list
https://bugs.webkit.org/show_bug.cgi?id=201581
Summary AX: HTML menu element should map to role=list
Scott
Reported 2019-09-07 07:04:49 PDT
Created attachment 378291 [details] 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: "The menu element is simply a semantic alternative to ul..." 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 & navigate to the element and the contained list items.
Attachments
test case of menu pattern and ul pattern to verify menus are not exposed the same as unordered lists (1.39 KB, text/html)
2019-09-07 07:04 PDT, Scott
no flags
Radar WebKit Bug Importer
Comment 1 2019-09-07 07:05:09 PDT
Scott
Comment 2 2021-05-30 06:57:26 PDT
Re-reviewing this ticket today, I can confirm that Chromium browsers and Firefox correctly expose a <menu> as a list. Webkit still does not have the correct mapping for this element.
Frédéric Wang (:fredw)
Comment 3 2022-07-29 01:13:43 PDT
https://w3c.github.io/html-aam/ also seems to say it's mapped to list role. Checking AccessibilityNodeObject::determineAccessibilityRoleFromNode ( https://github.com/WebKit/WebKit/blob/main/Source/WebCore/accessibility/AccessibilityNodeObject.cpp#L262 ) I see: - <ol> and <ul> are mapped to AccessibilityRole::List; - <menu type="toolbar"> tag is mapped to AccessibilityRole::Toolbar ; we'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 <menu> 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't checked yet what Chromium does. Assigning to Sirri.
Sirri Celles
Comment 4 2022-08-23 02:56:08 PDT
Anne van Kesteren
Comment 5 2023-05-15 02:14:00 PDT
EWS
Comment 6 2023-05-15 10:39:14 PDT
Committed 264077@main (af6778aa0405): <https://commits.webkit.org/264077@main> Reviewed commits have been landed. Closing PR #13872 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.