[wpt-sync] Sync PR 53363 - [menu] Activation behavior for open/close menu on arrow navigation
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 53363 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/53363
Details from upstream follow.
Di Zhang <dizhangg@chromium.org> wrote:
[menu] Activation behavior for open/close menu on arrow navigation
This patch updates the HTMLMenuItemElement::DefaultEventHandler method
to handle invoking menulist on arrow key navigations. We follow the
suggestions as outlined by APG for menubar [1].
- If element is a menuitem in a menulist,
- If arrow RIGHT,
- If menuitem invokes a sub-menulist,
- If sub-menulist is closed, show the sub-menulist.
- Focus on its first child.
- Else, close all popovers. If it has an ancestor menubar and its
ancestor invoker has a next menuitem, focus on that next menuitem.- Else if arrow LEFT,
- Close the menulist that this menuitem is a child of.
- If its invoker is in a menulist, focus on this invoker.
- If its invoker is in a menubar, focus on the previous menuitem.
- Else if element is a menuitem in a menubar,
- If element invokes a menulist,
- If arrow UP, focus the last menuitem in the menulist.
- Else if arrow DOWN, focus the first menuitem in the menulist.
Note these changes are for arrow navigation starting from a menuitem. A
follow-up patch for menulist invoked from button might be necessary.[1] https://www.w3.org/WAI/ARIA/apg/patterns/menubar/
Change-Id: I97aa335a3e4702caf12d503f7ef6a069086e6307
Bug: 422803239, 406566432
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6644040
Reviewed-by: Mason Freed \<masonf@chromium.org>
Commit-Queue: Di Zhang \<dizhangg@chromium.org>
Reviewed-by: Dominic Farolino \<dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1478114}
Assignee | ||
Updated•3 days ago
|
Assignee | ||
Comment 1•3 days ago
|
||
Assignee | ||
Comment 2•2 days ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 2 tests and 3 subtests
Status Summary
Firefox
OK
: 2
FAIL
: 6
Chrome
OK
: 2
FAIL
: 6
Safari
OK
: 2
FAIL
: 6
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /html/semantics/menu/tentative/focus-menu-elements-arrowoperations.html [wpt.fyi]
- Should use arrow keys to move between menuitems in menulist.:
FAIL
(Chrome:FAIL
, Safari:FAIL
) - Should use arrow keys to move between menuitems in menulist with display block.:
FAIL
(Chrome:FAIL
, Safari:FAIL
) - Should use arrow keys to move between menuitems in menubar.:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- Should use arrow keys to move between menuitems in menulist.:
- /html/semantics/menu/tentative/focus-menu-elements-nested-arrowoperations.html [wpt.fyi]
- Should use arrow keys to move between menuitems in menulist invoked from menubar.:
FAIL
(Chrome:FAIL
, Safari:FAIL
) - Should use arrow keys to move between menuitems in menulist invoked from menubar inside a popover without closing the popover.:
FAIL
(Chrome:FAIL
, Safari:FAIL
) - Should use arrow keys to move between menuitems: Hide popover on beforetoggle should still work.:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- Should use arrow keys to move between menuitems in menulist invoked from menubar.:
Description
•