Background
Currently, Menus support the up and down arrow keys, Selecting with ⌃+Space is also possible.
(Menu is part of TypeaheadSearch component as one of the first Codex components going into public.)
Goal
In order to follow ARIA best practice on role="listbox", we should also consider supporting:
- Home/End, for navigating to the first/last item
- Allow the user to type characters and jump to the first item whose label/value matches those characters
Design spec
Keyboard navigation table in this Figma spec sheet.
Acceptance criteria (or Done)
(more details in this comment)
- Home/End, for navigating to the first/last item
- Allow the user to type characters and jump to the first item whose label/value matches those characters (this just needs to be implemented in the select component. Other components already have this feature)
- Change behavior to "open" and "close" the menu when clicking the Space button but without selecting the currently highlighted item
- Add the ability to select an item by clicking ⌃+Space
- Change the current functionality to make sure we do NOT loop around when clicking ↑ at beginning or ↓ at end of options