Widget Roles
Widget roles are labels defined by WAI-ARIA that tell assistive technologies, such as screen readers, that an element is an interactive control and what kind of control it is (for example, a button, checkbox, or tab). They help users understand a component and how to interact with it, which is especially useful for custom controls built with generic HTML elements. Note that the abstract 'widget' role itself is part of the ARIA ontology and is not meant to be used directly by web authors.
In the WAI-ARIA role taxonomy, 'widget' is an abstract superclass role representing an interactive component of a graphical user interface; per the specification and MDN, this abstract role exists for the ontology and should not be applied by authors. The concrete widget roles derived from it define common interactive patterns and are commonly divided into two groups: standalone widget roles (for example, button, checkbox, link, menuitem, tab, slider) and composite widget roles that act as containers managing descendant widgets (for example, menu, menubar, tablist, listbox, tree, grid). Many widget roles carry structural constraints in the ARIA specification; for instance, several roles have a Required Context Role and cannot validly stand alone (menuitem requires a menu or menubar context, and tab requires a tablist), so authors must implement the associated container roles, states, properties, and keyboard interaction to produce a valid and usable pattern. Applying a widget role via ARIA exposes semantics to the accessibility tree but does not by itself provide behavior; correct roles, states, focus management, and keyboard support must be implemented and verified through manual and assistive technology testing, as automated checks detect only a portion of issues.
Why it matters
Widget roles are central to making custom interactive components understandable to people who use assistive technologies. When developers build controls out of generic HTML elements such as <div> or <span>, those elements carry no inherent meaning in the accessibility tree. Applying an appropriate widget role tells a screen reader that an element is, for example, a button, checkbox, or tab, so the user can recognize the component and understand how to interact with it. As the W3C notes, exposing roles for newly defined user interface widgets enables users to understand the widget and how to interact with it, which is especially important for rich internet applications that go beyond native HTML controls.
Getting widget roles right also carries structural obligations that are easy to overlook. Many widget roles have a Required Context Role in the ARIA specification and cannot validly stand alone: a menuitem requires a menu or menubar container, and a tab requires a tablist. Assigning a role without implementing its required container, associated states and properties, and keyboard interaction can produce a component that appears semantically correct but behaves incorrectly or confusingly for assistive technology users. Because the abstract 'widget' role itself exists only for the ARIA ontology and is not meant to be used directly by authors, developers must select the specific concrete role that matches the pattern they are building.
It is important to recognize that applying a role exposes semantics but does not supply behavior. Correct roles, states, focus management, and keyboard support must all be implemented and then verified. Automated checks detect only a portion of potential issues, so manual and assistive technology testing remain necessary to confirm that a widget is actually usable. This guidance describes technical standards and is not legal advice; organizations with compliance questions should consult qualified counsel and current agency guidance.
Who it's relevant to
Inside Widget Roles
Common questions
Answers to the questions practitioners most commonly ask about Widget Roles.