Skip to content

Add support for submenus  #287

@corymharper

Description

@corymharper

Right now, the only fully supported implementation by our hook is a one level deep menu, submenus require extra keyboard controls and considerations that aren't currently implemented.

A merge request that closes this issue should ensure that the WAI-ARIA Practices are still followed to conformity for a vertical menu. This includes:

Right Arrow:

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

Left Arrow:

  • When focus is in a submenu of an item in a menu, closes the submenu and returns focus to the parent menuitem.

Escape:

  • Close the menu that contains focus and return focus to the element or context, e.g., menu button or parent menuitem, from which the menu was opened.

The hook also supports the behavior of moving to the first menu item that starts with a specific printable character when it is pressed. If submenus are supported, that behavior should be contained to the current menu context (i.e. the menu within which elements currently have focus).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions