Issue Bug Closed

#104530Keyboard usage in Module Menu: use of ENTER/SPACE not consistent

Ayke Halder 08/01/24, 20:50 updated 12/02/25, 14:33

Description

Use of ENTER/SPACE in Module Menu for sub-menus must be consistent.

On ENTER/SPACE:

  • If sub-menu is closed: jump to first sub-menu entry – and of course open the sub-menu
  • If sub-menu is open: also jump to first sub-menu entry.

The current state is to close the sub-menu on ENTER/SPACE if it is already opened.

Current state of user journey

If sub-menu is closed:

  1. User focuses sub-menu via arrow-keys -> screen-reader: “Web menu – opens menu”
  2. User presses ENTER
  3. The sub-menu opens and first element of sub-menu is focused. -> screen-reader: “Web menu – Page”

If sub-menu is already open:

  1. User focuses sub-menu via arrow-keys -> screen-reader: “Web menu – opens menu”
  2. User presses ENTER
  3. The sub-menu closes -> screen-reader: “Web menu – opens menu”
  4. User presses ENTER
  5. The sub-menu opens and first element of sub-menu is focused. -> screen-reader: “Web menu – Page”

——

See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/menu_role

> If focus was on the menu button, Enter opens the menu, giving focus to the first menu item.

> If focus is on the menu itself, Escape closes the menu and returns focus to the menu button or parent menubar item (…).

Reviews 2