WAI-ARIA Roles
==============

ARIA roles provide semantic meaning to content, allowing screen readers and other tools to present and support interaction with an object in a way that is consistent with user expectations of that type of object. ARIA roles can be used to describe elements that don't natively exist in HTML or exist but don't yet have full browser support.

By default, many semantic elements in HTML have a role; for example, `<input type="radio">` has the "radio" role. Non-semantic elements in HTML do not have a role; `<div>` and `<span>` without added semantics return `null`. The `role` attribute can provide semantics.

ARIA roles are added to HTML elements using `role="role type"`, where *role type* is the name of a role in the ARIA specification. Some roles require the inclusion of associated ARIA states or properties; others are only valid in association with other roles.

For example, `<ul role="tabpanel">` will be announced as a 'tab panel' by screen readers. However, if the tab panel doesn't have nested tabs, the element with the tabpanel role is not in fact a tab panel and accessibility has actually been negatively impacted.

The ARIA states and properties associated with each role are included in the role's pages, with each attribute also having a dedicated page.

ARIA role types
---------------

There are 6 categories of ARIA roles:

### 1. Document structure roles

Document Structure roles are used to provide a structural description for a section of content. Most of these roles should no longer be used as browsers now support semantic HTML element with the same meaning. The roles without HTML equivalents, such as presentation, toolbar and tooltip roles, provide information on the document structure to assistive technologies such as screen readers as equivalent native HTML tags are not available.

* toolbar
* tooltip
* feed
* math
* presentation / none
* note

For most document structure roles, semantic HTML equivalent elements are available and supported. Avoid using:

* application
* article (use `<article>`)
* cell (use `<td>`)
* columnheader (use `<th scope="col">`)
* definition (use `<dfn>`)
* directory
* document
* figure (use `<figure>` instead)
* group
* heading (use h1 through h6)
* img (use `<img>` or `<picture>` instead)
* list (use either `<ul>` or `<ol>` instead)
* listitem (use `<li>` instead)
* meter (use `<meter>` instead)
* row (use the `<tr>` with `<table>`)
* rowgroup (use `<thead>`, `<tfoot>` and `<tbody>`)
* rowheader (use `<th scope="row">`)
* separator (use `<hr>` if it doesn't have focus)
* table (use `<table>`)
* term (use `<dfn>`)

These are included for completeness, but in most cases are rarely, if ever, useful:

* `associationlist`
* `associationlistitemkey`
* `associationlistitemvalue`
* `blockquote`
* `caption`
* `code`
* `deletion`
* `emphasis`
* `insertion`
* `paragraph`
* `strong`
* `subscript`
* `superscript`
* `time`
### 2. Widget roles

The various widget role are used to define common interactive patterns. Similar to the document structure roles, some of these roles duplicate the semantics of native HTML elements that are well supported, and should not be used. The difference between the two lists is that, generally, the widget roles require JavaScript interaction and the document structure roles don't necessarily.

* scrollbar
* searchbox
* separator (when focusable)
* slider
* spinbutton
* switch
* tab
* tabpanel
* treeitem

Avoid using button, checkbox, gridcell, link, menuitem, menuitemcheckbox, menuitemradio, option, progressbar, radio, and textbox, which we've included for completeness. For most, semantic equivalents with accessible interactivity are available and supported. See the individual role documentation for more information.

#### Composite widget roles

* combobox
* menu
* menubar
* tablist
* tree
* treegrid

Avoid using grid, listbox, and radiogroup, which we've included for completeness. See the individual role documentation for more information.

Note that there is also a widget role (`role="widget"`), which is an abstract role and not in the widget role category.

### 3. Landmark roles

Landmark roles provide a way to identify the organization and structure of a web page. By classifying and labeling sections of a page, structural information conveyed visually through layout is represented programmatically. Screen readers use landmark roles to provide keyboard navigation to important sections of a page. Use these sparingly. Too many landmark roles create "noise" in screen readers, making it difficult to understand the overall layout of the page.

* banner (document `<header>`)
* complementary (`<aside>`)
* contentinfo (document `<footer>`)
* form (`<form>`)
* main (`<main>`)
* navigation (`<nav>`)
* region (`<section>`)
* search (`<search>`)
### 4. Live region roles

Live Region roles are used to define elements with content that will be dynamically changed. Sighted users can see dynamic changes when they are visually noticeable. These roles help low vision and blind users know if content has been updated. Assistive technologies, like screen readers, can be made to announce dynamic content changes:

* alert
* log
* marquee
* status
* timer
### 5. Window roles

Window roles define sub-windows to the main document window, within the same window, such as pop up modal dialogs:

* alertdialog
* dialog
### 6. Abstract roles

Abstract roles are only intended for use by browsers to help organize and streamline a document. They should not be used by developers writing HTML markup. Doing so will not result in any meaningful information being conveyed to assistive technologies or to users.

Avoid using command, composite, input, landmark, range, roletype, section, sectionhead, select, structure, widget,and window.

**Note:** Don't use abstract roles in your sites and applications. They are for use by browsers. They are included for reference only.

**Warning:** "Abstract roles are used for the ontology. Authors **MUST NOT** use abstract roles in content." - The WAI-ARIA specification

Roles defined on MDN
--------------------

The following are the reference pages covering the WAI-ARIA roles discussed on MDN.

ARIA: alert roleThe `alert` role is for important, and usually time-sensitive, information. The `alert` is a type of `status` processed as an atomic live region.

ARIA: alertdialog roleThe **alertdialog** role is to be used on modal alert dialogs that interrupt a user's workflow to communicate an important message and require a response.

ARIA: application roleThe `application` role indicates to assistive technologies that an element *and all of its children* should be treated similar to a desktop application, and no traditional HTML interpretation techniques should be used. This role should only be used to define very dynamic and desktop-like web applications. Most mobile and desktop web apps *are not* considered applications for this purpose.

ARIA: article roleThe `article` role indicates a section of a page that could easily stand on its own on a page, in a document, or on a website. It is usually set on related content items such as comments, forum posts, newspaper articles or other items grouped together on one page.

ARIA: banner roleThe `banner` role is for defining a global site header, which usually includes a logo, company name, search feature, and possibly the global navigation or a slogan. It is generally located at the top of the page.

ARIA: button roleThe `button` role is for clickable elements that trigger a response when activated by the user. Adding `role="button"` tells the screen reader the element is a button, but provides no button functionality. Use `button` or `input` with `type="button"` instead.

ARIA: cell roleThe `cell` value of the ARIA *role* attribute identifies an element as being a cell in a tabular container that does not contain column or row header information. To be supported, the cell must be nested in an element with the role of `row`.

ARIA: checkbox roleThe `checkbox` role is for checkable interactive controls. Elements containing `role="checkbox"` must also include the `aria-checked` attribute to expose the checkbox's state to assistive technology.

ARIA: columnheader roleThe `columnheader` value of the ARIA role attribute identifies an element as being a cell in a row contains header information for a column, similar to the native `th` element with column scope.

ARIA: combobox roleThe `combobox` role identifies an element as an `input` that controls another element, such as a `listbox` or `grid`, that can dynamically pop up to help the user set the value of that `input`.

ARIA: command roleThe `command` role defines a widget that performs an action but does not receive input data.

ARIA: comment roleThe `comment` role semantically denotes a comment/reaction to some content on the page, or to a previous comment.

ARIA: complementary roleThe `complementary` landmark role is used to designate a supporting section that relates to the main content, yet can stand alone when separated. These sections are frequently presented as sidebars or call-out boxes. If possible, use the HTML <aside> element instead.

ARIA: composite roleThe `composite` abstract role indicates a widget that may contain navigable descendants or owned children.

ARIA: contentinfo roleThe `contentinfo` role defines a footer, containing identifying information such as copyright information, navigation links, and privacy statements, found on every document within a site. This section is commonly called a footer.

ARIA: definition roleThe `definition` ARIA role indicates the element is a definition of a term or concept.

ARIA: dialog roleThe `dialog` role is used to mark up an HTML based application dialog or window that separates content or UI from the rest of the web application or page. Dialogs are generally placed on top of the rest of the page content using an overlay. Dialogs can be either non-modal (it's still possible to interact with content outside of the dialog) or modal (only the content in the dialog can be interacted with).

ARIA: directory roleThe `directory` role was for a list of references to members of a group, such as a static table of contents.

ARIA: document roleThe `document` role is for focusable content within complex composite widgets or applications for which assistive technologies can switch reading context back to a reading mode.

ARIA: document structural rolesARIA document-structure roles are used to provide a structural description for a section of content.

ARIA: feed roleA `feed` is a dynamic scrollable `list` of `articles` in which articles are added to or removed from either end of the list as the user scrolls. A `feed` enables screen readers to use the browse mode reading cursor to both read and scroll through a stream of rich content that may continue scrolling infinitely by loading more content as the user reads.

ARIA: figure roleThe ARIA `figure` role can be used to identify a figure inside page content where appropriate semantics do not already exist. A figure is generally considered to be one or more images, code snippets, or other content that puts across information in a different way to a regular flow of text.

ARIA: form roleThe `form` role can be used to identify a group of elements on a page that provide equivalent functionality to an HTML form. The form is not exposed as a landmark region unless it has an accessible name.

ARIA: generic roleThe `generic` role creates a nameless container element which has no semantic meaning on its own.

ARIA: grid roleThe grid role is for a widget that contains one or more rows of cells. The position of each cell is significant and can be focused using keyboard input.

ARIA: gridcell roleThe gridcell role is used to make a cell in a grid or treegrid. It is intended to mimic the functionality of the HTML `td` element for table-style grouping of information.

ARIA: group roleThe `group` role identifies a set of user interface objects that is not intended to be included in a page summary or table of contents by assistive technologies.

ARIA: heading roleThe `heading` role defines this element as a heading to a page or section, with the `aria-level` attribute providing for more structure.

ARIA: img roleThe ARIA `img` role can be used to identify multiple elements inside page content that should be considered as a single image. These elements could be images, code snippets, text, emojis, or other content that can be combined to deliver information in a visual manner.

ARIA: input roleThe `input` abstract role is a generic type of widget that allows user input.

ARIA: landmark roleA landmark is an important subsection of a page. The `landmark` role is an abstract superclass for the aria role values for sections of content that are important enough that users will likely want to be able to navigate directly to them.

ARIA: link roleA `link` widget provides an interactive reference to a resource. The target resource can be either external or local; i.e., either outside or within the current page or application.

ARIA: list roleThe ARIA `list` role can be used to identify a list of items. It is normally used in conjunction with the `listitem` role, which is used to identify a list item contained inside the list.

ARIA: listbox roleThe `listbox` role is used for lists from which a user may select one or more items which are static and, unlike HTML `select` elements, may contain images.

ARIA: listitem roleThe ARIA `listitem` role can be used to identify an item inside a list of items. It is normally used in conjunction with the `list` role, which is used to identify a list container.

ARIA: log roleThe `log` role is used to identify an element that creates a live region where new information is added in a meaningful order and old information may disappear.

ARIA: main roleThe `main` landmark role is used to indicate the primary content of a document. The main content area consists of content that is directly related to or expands upon the central topic of a document, or the main function of an application.

ARIA: mark roleThe `mark` role denotes content which is marked or highlighted for reference or notation purposes, due to the content's relevance in the enclosing context.

ARIA: marquee roleA `marquee` is a type of live region containing non-essential information which changes frequently.

ARIA: math roleThe `math` role indicates that the content represents a mathematical expression.

ARIA: menu roleThe `menu` role is a type of composite widget that offers a list of choices to the user.

ARIA: menubar roleA `menubar` is a presentation of `menu` that usually remains visible and is usually presented horizontally.

ARIA: menuitem roleThe `menuitem` role indicates the element is an option in a set of choices contained by a `menu` or `menubar`.

ARIA: menuitemcheckbox roleA `menuitemcheckbox` is a `menuitem` with a checkable state whose possible values are `true`, `false`, or `mixed`.

ARIA: menuitemradio roleA `menuitemradio` is checkable menuitem in a set of elements with the same role, only one of which can be checked at a time.

ARIA: meter roleThe `meter` role is used to identify an element being used as a meter.

ARIA: navigation roleThe `navigation` role is used to identify major groups of links used for navigating through a website or page content.

ARIA: none roleThe `none` role is a synonym for the `presentation` role; they both remove an element's implicit ARIA semantics from being exposed to the accessibility tree.

ARIA: note roleA `note` role suggests a section whose content is parenthetic or ancillary to the main content.

ARIA: option roleThe `option` role is used for selectable items in a `listbox`.

ARIA: presentation roleThe `presentation` role and its synonym `none` remove an element's implicit ARIA semantics from being exposed to the accessibility tree.

ARIA: progressbar roleThe `progressbar` role defines an element that displays the progress status for tasks that take a long time.

ARIA: radio roleThe `radio` role is one of a group of checkable radio buttons, in a `radiogroup`, where no more than a single radio button can be checked at a time.

ARIA: radiogroup roleThe `radiogroup` role is a group of `radio` buttons.

ARIA: range roleThe `range` abstract role is a generic type of structure role representing a range of values.

ARIA: region roleThe **`region`** role is used to identify document areas the author deems significant. It is a generic landmark available to aid in navigation when none of the other landmark roles are appropriate.

ARIA: roletype roleThe **`roletype`** role, an abstract role, is the base role from which all other ARIA roles inherit.

ARIA: row roleAn element with `role="row"` is a row of cells within a tabular structure. A row contains one or more cells, grid cells or column headers, and possibly a row header, within a `grid`, `table` or `treegrid`, and optionally within a `rowgroup`.

ARIA: rowgroup roleAn element with `role="rowgroup"` is a group of rows within a tabular structure. A `rowgroup` contains one or more rows of cells, grid cells, column headers, or row headers within a `grid`, `table` or `treegrid`.

ARIA: rowheader roleAn element with `role="rowheader"` is a cell containing header information for a row within a tabular structure of a `grid`, `table` or `treegrid`.

ARIA: scrollbar roleA `scrollbar` is a graphical object that controls the scrolling of content within a viewing area.

ARIA: search roleThe `search` role is used to identify the search functionality; the section of the page used to search the page, site, or collection of sites.

ARIA: searchbox roleThe `searchbox` role indicates an element is a type of `textbox` intended for specifying search criteria.

ARIA: section roleThe **`section` role**, an abstract role, is a superclass role for renderable structural containment components.

ARIA: sectionhead roleThe **`sectionhead` role**, an abstract role, is superclass role for labels or summaries of the topic of its related section.

ARIA: select roleThe **`select` role**, an abstract role, is superclass role for form widgets that allows the user to make selections from a set of choices.

ARIA: separator roleThe `separator` role indicates the element is a divider that separates and distinguishes sections of content or groups of menuitems. The implicit ARIA role the native thematic break `hr` element is `separator`.

ARIA: slider roleThe `slider` role defines an input where the user selects a value from within a given range.

ARIA: spinbutton roleThe `spinbutton` role defines a type of range that expects the user to select a value from among discrete choices.

ARIA: status roleThe `status` role defines a live region containing advisory information for the user that is not important enough to be an `alert`.

ARIA: structure roleThe `structure` role is for document structural elements.

ARIA: suggestion roleThe `suggestion` role semantically denotes a single proposed change to an editable document. This should be used on an element that wraps an element with an `insertion` role, and one with a `deletion` role.

ARIA: switch roleThe ARIA **`switch`** role is functionally identical to the checkbox role, except that instead of representing "checked" and "unchecked" states, which are fairly generic in meaning, the `switch` role represents the states "on" and "off."

ARIA: tab roleThe ARIA `tab` role indicates an interactive element inside a `tablist` that, when activated, displays its associated `tabpanel`.

ARIA: table roleThe `table` value of the ARIA `role` attribute identifies the element containing the role as having a non-interactive table structure containing data arranged in rows and columns, similar to the native `table` HTML element.

ARIA: tablist roleThe `tablist` role identifies the element that serves as the container for a set of `tabs`. The tab content are referred to as `tabpanel` elements.

ARIA: tabpanel roleThe ARIA `tabpanel` is a container for the resources of layered content associated with a `tab`.

ARIA: term roleThe `term` role can be used for a word or phrase with an optional corresponding `definition`.

ARIA: textbox roleThe `textbox` role is used to identify an element that allows the input of free-form text. Whenever possible, rather than using this role, use an `input` element with type="text", for single-line input, or a `textarea` element for multi-line input.

ARIA: timer roleThe **`timer`** role indicates to assistive technologies that an element is a numerical counter listing the amount of elapsed time from a starting point or the remaining time until an end point. Assistive technologies will not announce updates to a timer as it has an implicit aria-live value of `off`.

ARIA: toolbar roleThe `toolbar` role defines the containing element as a collection of commonly used function buttons or controls represented in a compact visual form.

ARIA: tooltip roleA `tooltip` is a contextual text bubble that displays a description for an element that appears on pointer hover or keyboard focus.

ARIA: tree roleA `tree` is a widget that allows the user to select one or more items from a hierarchically organized collection.

ARIA: treegrid roleThe `treegrid` role identifies an element as being grid whose rows can be expanded and collapsed in the same manner as for a `tree`.

ARIA: treeitem roleA `treeitem` is an item in a `tree`.

ARIA: widget roleThe **`widget`** role, an abstract role, is an interactive component of a graphical user interface (GUI).

ARIA: window roleThe `window` role defines a browser or app window.

See also
--------

* Using ARIA: Roles, States, and Properties
* ARIA states and properties