Semantics

A presentation of menu that usually remains visible and is usually presented horizontally.

Additional info from the ARIA specification

The menubar role is used to create a menu bar similar to those found in Windows, Mac, and Gnome desktop applications. A menu bar is used to create a consistent set of frequently used commands. Authors SHOULD ensure that menubar interaction is similar to the typical menu bar interaction in a desktop graphical user interface.

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 menubar have an implicit aria-orientation value of horizontal.

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=menubar]
  • nav[role=menubar]
  • ol[role=menubar]
  • ul[role=menubar]

Elements that can have any role

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