A Listbox is a vertical list of interactive options, with room for icons, descriptions, and other elements.
Basic implementation of a control element used to let merchants select options
A listbox can be composed of:
- Options: The individual options inside the Listbox that merchants can select or deselect.
- Dividers: Placed between items and are useful in complex lists when there’s a lot of information for the merchant to parse.
- Section headers: Used at the begining of a section when it’s necessary to call out the content being displayed. In most cases, the surrounding context should be enough for the merchant to understand the information in the list.
- Be clearly labeled so it’s noticeable to the merchant what type of options will be available
- Limit the number of options displayed at once
- Indicate a loading state to the merchant while option data is being populated
Each item in a Listbox should be clear and descriptive.
- Traffic referrer source
Patterns that use Listbox
- For a text field and popover container, use the combobox component
- Autocomplete can be used as a convenience wrapper in lieu of Combobox and Listbox.
See Material Design and development documentation about accessibility for Android:
See Apple’s Human Interface Guidelines and API documentation about accessibility for iOS:
The Listbox component is based on the Aria 1.2 Listbox pattern.
It is important to not present interactive elements inside of list box options as they can interfere with navigation for assistive technology users.
- Use labels
- Use interactive elements inside the list
- Access the list of options with the up and down arrow keys
- Select an option that has focus with the enter/return key