Semantics

A type of widget that offers a list of choices to the user.

Additional info from the ARIA specification

A menu is a container, generally rendered as a popup or overlay, for a set of menu items that can be invoked to perform an action or function. The function is almost always closely related or directly related to the element that the user activated to invoke the menu. Activating a menu item both performs the associated function of the menu item, and results in the automatic dismissal of the menu.

The menu role is appropriate when a set of menu items is presented in a manner similar to a popup menu. For instance, a menu could be used to represent a context menu for its invoking element, or it would be used to render sub-menus for items of a menubar or another menu popup.

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

Elements with the role menu 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 menuitem, menuitemcheckbox, and menuitemradio roles allowed.

Usage

Allowed HTML elements

Implicit semantics

  • None

Explicitly allowed

  • menu[role=menu]
  • nav[role=menu]
  • ol[role=menu]
  • select[role=menu]
  • ul[role=menu]

Elements that can have any role

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