Accessibility
- The list is a
menu, a divider aseparator, and each item amenuitem— or, in a menu that carries a selection, amenuitemradio; a gap keeps the items in one menu. The opener hasaria-haspopup,aria-expandedandaria-controls. DownandUpmove between items, skipping disabled ones;HomeandEndgo to the ends; typing a letter moves to the next item starting with it.EnterorSpacechooses.Rightopens a submenu andLeftcloses it.Escapecloses the menu and returns focus to the opener;Tabcloses it and moves on.- Keyboard focus draws a 3dp inward
secondaryfocus ring on the focused item (or on the menu surface when it opens empty); a pointer shows no ring. - Disabled items are
aria-disabled. In a menu that carries a selection the items aremenuitemradioand the selected one isaria-checked, updated bysetSelected; a menu with no selection keeps plainmenuitem, and a listbox keepsoptionwitharia-selected.