Skip to content

[web-components] Menu-list is not closed when an item is selected using keyboard #31850

@mlijanto

Description

@mlijanto

The menu-list component in menu is not closed when a menu-item is selected using keyboard. The menu-list is closed as expected when a menu-item is clicked.

Expected behavior based on the menu APG (https://www.w3.org/WAI/ARIA/apg/patterns/menubar/):

Enter:

  • When focus is on a menuitem that has a submenu, opens the submenu and places focus on its first item.
  • Otherwise, activates the item and closes the menu

Space:

  • (Optional): When focus is on a menuitemcheckbox, changes the state without closing the menu.
  • (Optional): When focus is on a menuitemradio that is not checked, without closing the menu, checks the focused menuitemradio and unchecks any other checked menuitemradio element in the same group.
  • (Optional): When focus is on a menuitem that has a submenu, opens the submenu and places focus on its first item.
  • (Optional): When focus is on a menuitem that does not have a submenu, activates the menuitem and closes the menu.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions