Build Autocomplete({ options, onSelect }): a text field labelled Fruit with role="combobox". While the field has text, show a role="listbox" of the options that contain it (ignoring case) as role="option" items, or No matches. aria-expanded reflects whether the list is open. ArrowDown / ArrowUp move the highlight (the highlighted option has aria-selected="true" and its id is the input's aria-activedescendant). Enter picks the highlighted option and clicking an option picks it: the field takes its text, the list closes and onSelect(option) is called. Escape closes the list.