Keyboard Navigation
The keyboard navigation of the ContextMenu
is always available. To use it, you have to focus the component by pressing the Tab
key.
The ContextMenu supports the following keyboard shortcuts:
SHORTCUT | DESCRIPTION |
---|---|
Up Arrow | Focuses the previous item. |
Down Arrow | Focuses the next item. |
Left Arrow |
|
Right Arrow | If the item has children, opens the item and focuses the first child. For child items without children, opens the next root item and focuses its first child. |
Home | Focuses the first item. |
End | Focuses the last item. |
Enter | Selects the focused item. If the item has children, opens the item and focuses the first child. If the item does not have children and has a URL, navigates to the specified URL. |
Space | Selects the focused item. If the item has children, opens the item and focuses the first child. If the item does not have children and has a URL, navigates to the specified URL. |
Escape | (For child items) Closes and focuses the parent. |
Alphanumeric character | Focuses the next item with text starting with the character. |
If the orientation of the ContextMenu is horizontal, the arrow keys perform the following actions:
SHORTCUT | DESCRIPTION |
---|---|
Up Arrow |
|
Down Arrow |
|
Left Arrow |
|
Right Arrow |
|