Another <selectmenu> behavior to discuss: what should happen when the control's listbox is closed, and a user arrow keys up/down on the control's button?
Per my testing of <select> in Chromium and Gecko on Windows, up/down arrow keys advance backwards/forwards through the list of options without opening the listbox.
However looking at the example at https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html, up/down arrow open the listbox in addition to moving to the next previous option.
Down Arrow
- Moves focus to and selects the next option.
- If the listbox is collapsed, also expands the list.
Up Arrow
- Moves focus to and selects the previous option.
- If the listbox is collapsed, also expands the list.
The guidance in https://www.w3.org/TR/wai-aria-practices/#listbox_kbd_interaction doesn't state that up/down arrow should open the listbox.
Down Arrow: Moves focus to the next option. Optionally, in a single-select listbox, selection may also move with focus.
Up Arrow: Moves focus to the previous option. Optionally, in a single-select listbox, selection may also move with focus.
So I'm not clear on whether the best practice is to open the listbox or not when up/down arrow is pressed. Thoughts?
(Thanks @mfreed7 for pointing this out).
Another
<selectmenu>behavior to discuss: what should happen when the control's listbox is closed, and a user arrow keys up/down on the control's button?Per my testing of
<select>in Chromium and Gecko on Windows, up/down arrow keys advance backwards/forwards through the list of options without opening the listbox.However looking at the example at https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html, up/down arrow open the listbox in addition to moving to the next previous option.
The guidance in https://www.w3.org/TR/wai-aria-practices/#listbox_kbd_interaction doesn't state that up/down arrow should open the listbox.
So I'm not clear on whether the best practice is to open the listbox or not when up/down arrow is pressed. Thoughts?
(Thanks @mfreed7 for pointing this out).