Note: This wrapping behavior is useful when. Type-ahead is recommended for all listboxes, especially those with more than seven options: Type a character: focus moves to the next item with a name that starts with the typed character. Each child of a listbox should have a role of option. Identifies the popup element that lists suggested values. Type multiple characters in rapid succession: focus moves to the next item with a name that starts with the string of characters typed. Where the following descriptions of keyboard commands mention focus, they are referring to the visual focus indicator. .

This is the default value for elements with the. Users may set the value of the combobox by choosing a value from the list of suggested values. Authors MUST set aria-expanded to true on an element with role combobox when it is expanded and false when it is collapsed. activedescendant is used to tell assistive technologies which list option is currently selected.

Examples 2 and 3: If the listbox is displayed and the first option is automatically selected: Sets the textbox value to the content of the selected option. Typing one or more letters will navigate the list items (same letter goes to each item starting with that, different letters go to the first item starting with that entire string). Refers to the element that serves as the listbox popup. The listbox role is used to identify an element that creates a list from which a user may select one or more static items, similar to the HTML

If the listbox is displayed, moves focus to the last suggested value. If list items are checkable, Space can be used to toggle checkboxes. With the exception of one additional feature, this example has the same autocomplete behavior as the previous example that has list with automatic selection.
The example combobox on this page implements the following ARIA roles, states, and properties. The additional feature is that the portion of the selected suggestion that has not been typed by the user, a completion string, appears inline after the input cursor in the textbox. If the listbox is not displayed, in example 3 only, opens the listbox and moves focus to the first value. © 2005-2020 Mozilla and individual contributors. Authors MUST ensure an element with role combobox contains or owns a text input element with role textbox or searchbox and that the text input has aria-multiline set to false. The example comboboxes on this page implement the following ARIA roles, states, and properties. Other variations and options for the keyboard interface are described in the combobox design pattern in WAI-ARIA Authoring Practices 1.1. Focus remains on the edit box while the user manipulates the list. Content is available under these licenses. When an option in the listbox is visually indicated as having keyboard focus, refers to that option. Example 3: Indicates that the autocomplete behavior of the text input is to both show an inline completion string and suggest a list of possible values in a popup where the suggestions are related to the string that is present in the textbox.

ARIA defines semantics that can be applied to elements, with these divided into roles (defining a type of user interface element) and states and properties that are supported by a role. When the user selects an option, the following must occur: When the user clicks on an option, hits Space when focused on an option, or otherwise toggles the state of an option, the following must occur: The first rule of ARIA use is you can use a native feature with the semantics and behavior you require already built in, instead of re-purposing an element and adding an ARIA role, state or property to make it accessible, then do so. Authors must assign an ARIA role and the appropriate states and properties to an element during its life-cycle, unless the element already has appropriate ARIA semantics (via use of an appropriate HTML element). Roles, States, and Properties section of the combobox design pattern. List autocomplete with manual selection means that: List autocomplete with automatic selection means that: List with inline autocomplete means that: The example comboboxes on this page implement the following keyboard interface. Enables assistive technologies to know which element the application regards as focused while DOM focus remains on the, For more information about this focus management technique, see, The text content of the element provides the accessible name of the. Unlike this ARIA 1.1 combobox, an ARIA 1.0 pattern would have the combobox role on the textbox input instead of a parent container of the textbox.

Typically, the default state of a combobox is collapsed. using a listbox popup. Select the newly selected option, setting aria-selected="true" on the option and changing the appearance of the newly selected option to appear selected. The