Review main Merged

66283[FEATURE] Improve keyboard navigation for module menus

Martin Kutschker CR +2 V +2 Hard +367 −102 updated 03/16/21, 23:18

Commit message

The module menu implements the keyboard navigation suggested
by the ARIA Best Practices 1.1 for roles "menubar" and "menu".
The first level menu has a "menubar" role, the second level
submenus have a "menu" role. The buttons have the "menuitem"
role. Both the "menubar" and the "menu" are oriented
vertically for assistive technology matching the visual
representation which affects the keyboard navigation.

Space/Enter show the module unless the item has a submenu.
Space/Enter and Right Arrow open a submenu and move focus to
the first item.

Up/Down Arrow and Home/End navigate within the current
level of the menu.
Ctrl + Home/End navigate within the first level of the menu
(extension of the ARIA pattern).

Left/Right Arrow moves to the parent item's predecessor/successor
when on a submodule item. The submenu will not be closed
(deviation from the ARIA pattern).

Escape moves to the parent item of a submodule item.
The submenu will not be closed (deviation from the ARIA pattern).

Tab and Shift + Tab move to the next item outside of the
module menu.

The help menu implements the keyboard navigation suggested
by the ARIA Best Practices 1.1 for the role "menu". This
is the same as the module menu but limited to a single level.

The change detaches again the module menu's event listener
from the document as in #91642, but reinitializes
the event listeners to handle situations as described in #93008
properly.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 3

Files 11