OpenA11y Evaluation Library

aria-haspopup references a supported widget

Rule ID Widget 16
Conformance Required
Definition aria-haspopup references a dialog, grid, listbox, menu or tree widget.
Purpose
  • In ARIA, interactive menus, listboxes, trees, grids, and dialogs that appear on top of other content when triggered to appear are considered "popups".
  • These popups are triggered by one or more interactive elements on the page (e.g. button, textbox ...)
  • The availability and type of popup the interactive element will trigger is identified with the aria-haspopup value.
  • Screen readers often change from "reading" to "interactive" mode when an element with aria-haspopup is triggered, since keyboard focus is expected to move to referenced widget.
Conformance Required
WCAG Success Criteria

Success Criterion 4.1.2 Name, Role, Value

Rule Category ARIA Widgets
Rule Scope Element
First Step no
aXe Rules
Wave Rules
Techniques
  • If the trigger opens an ARIA defined dialog, set aria-haspopup="dialog".
  • If the trigger opens an ARIA defined grid, set aria-haspopup="grid".
  • If the trigger opens an ARIA defined listbox, set aria-haspopup="listbox".
  • If the trigger opens an ARIA defined menu, set aria-haspopup="menu".
  • If the trigger opens an ARIA defined tree, set aria-haspopup="tree".
  • Remove the aria-haspopup if the trigger is NOT associated with a ARIA defined dialog, grid, listbox, menu and tree. For example, the aria-haspopup is often mistakenly used with disclosure buttons, since content often appears on the screen similar to the supported widgets.
Information Links