Semantics

A widget that allows the user to select one or more items from a list of choices.

Additional info from the ARIA specification

See related combobox and list.

Items within the list are static and, unlike standard HTML select elements, can contain images. List boxes contain children whose role is option or elements whose role is group which in turn contain children whose role is option.

To be keyboard accessible, authors SHOULD manage focus of option descendants for all instances of this role, as described in Managing Focus.

Elements with the role listbox have an implicit aria-orientation value of vertical.

Abstract Role

  • CompositeRepresents a container for navigating interactive descendants.

Content Categories

  • Flow ContentAn element that structures and organizes the body of a web document.

Allowed Descendants

Specific Guidance

Only option and group roles allowed.

Usage

Allowed HTML elements

Implicit semantics

These elements have the role semantics by default, without needing to set the role attribute. Reach for elements with native semantics first when choosing how to implement a role in your content.

  • select[multiple]

Explicitly allowed

  • datalist[role=listbox]
  • menu[role=listbox]
  • ol[role=listbox]
  • ul[role=listbox]

Elements that can have any role

  • abbr[role=listbox]
  • address[role=listbox]
  • b[role=listbox]
  • blockquote[role=listbox]
  • canvas[role=listbox]
  • cite[role=listbox]
  • code[role=listbox]
  • custom-element[role=listbox]
  • data[role=listbox]
  • del[role=listbox]
  • dfn[role=listbox]
  • div[role=listbox]
  • em[role=listbox]
  • figure[role=listbox]
  • i[role=listbox]
  • ins[role=listbox]
  • kbd[role=listbox]
  • mark[role=listbox]
  • output[role=listbox]
  • p[role=listbox]
  • pre[role=listbox]
  • q[role=listbox]
  • samp[role=listbox]
  • small[role=listbox]
  • span[role=listbox]
  • table[role=listbox]
  • tbody[role=listbox]
  • tfoot[role=listbox]
  • thead[role=listbox]
  • time[role=listbox]
  • u[role=listbox]
  • var[role=listbox]