Accessibility
- With flat options, the input is a select-only combobox (
role="combobox",aria-haspopup,aria-expanded,aria-controls) over alistboxof options. Focus stays on the input, which names the active option witharia-activedescendant. - When a key moves
aria-activedescendant, the active option (mtrl-menu__item--keyboard-active) draws a 3dp inwardsecondaryfocus ring; opening or hovering with a pointer shows no ring. - The label names the input, as on a text field.
| Keys | Action |
|---|---|
Enter / Space |
Opens the menu, or chooses the active option |
Down / Up |
Opens the menu, or moves the active option |
Alt + Down / Alt + Up |
Opens the menu / chooses the active option |
Home / End |
The first / last option |
Page Down / Page Up |
Moves several options |
| A letter | The next option starting with what was typed |
Escape |
Closes the menu without choosing |
Tab |
Chooses the active option, and moves on |