[go: nahoru, domu]

This specification defines the authoring rules (author conformance requirements) for the use of [[[wai-aria-1.2]]] and [[[dpub-aria-1.0]]] attributes on [[HTML]] elements. This specification's primary objective is to define requirements for use with conformance checking tools used by authors (i.e., web developers). These requirements will aid authors in their development of web content, including custom interfaces and widgets, which make use of ARIA to complement or extend the features of the host language [[HTML]].

ARIA in HTML is an [[HTML]] specification module. Any HTML features, conformance requirements, or terms that this specification module makes reference to, but does not explicitly define, are defined by the [[HTML|HTML Standard]].

Since this specification become a W3C Recommendation on 09 December 2021, the following substantive additions and/or corrections have been proposed:

Reviewers of the document can identify candidate additions and/or corrections by their distinctive styling in the document:

Candidate corrections are marked in the document.

Candidate additions are marked in the document.

Author requirements for use of ARIA in HTML

Authors MAY use the ARIA `role` and `aria-*` attributes to change the exposed meaning (semantics) of [=HTML elements=], in accordance with the requirements defined by [[wai-aria-1.2|WAI-ARIA]], except where ARIA features conflict with the strong native semantics or are equal to the implicit ARIA semantics of a given HTML element. The implicit ARIA semantics for the features of HTML are defined by the [[html-aam-1.0|HTML Accessibility API Mappings]] specification.

Any constraints for the use of ARIA features in HTML defined by this specification are intended to prevent authors from making assistive technology products report nonsensical user interface (UI) information that does not represent the actual UI of the document.

Authors MUST NOT use the ARIA `role` and `aria-*` attributes in a manner that conflicts with the semantics described in the [[[#docconformance]]] and [[[#docconformance-attr]]] tables. It is NOT RECOMMENDED for authors to set the ARIA `role` and `aria-*` attributes to values that match the implicit ARIA semantics defined in either table. Doing so is unnecessary and can potentially lead to unintended consequences.

ARIA semantics that extend and diverge from HTML

Through the use of ARIA, authors can specify semantics that go beyond the current capabilities of native HTML. This can be very useful, as it provides authors the opportunity to create widgets, or expose specific accessible states and properties to native HTML features which would not be possible by the use of HTML alone.

For instance, a `button` element has no native HTML feature to expose a "pressed" state. ARIA allows authors to extend the semantics of the element by specifying the `aria-pressed` attribute, allowing for an aural UI that will match the visual presentation of the control.

In the following example, a `button` element allows for a user to toggle the state of a setting within a web application. The `aria-pressed` attribute is used to augment the `button` element. When in the "pressed" state that information can be exposed to users of assistive technologies.

      <button aria-pressed=true>...</button>
      

There are also situations where certain `aria-*` attributes are allowed for use on elements with specific `role`s, while the equivalent native attribute is currently not valid in HTML itself.

For instance, HTML has no direct concept of a disabled hyperlink (`a href` element). Constructs such as `<a href="..." disabled> ... </a>` are not valid, and will not be conveyed to assistive technologies.

ARIA diverges from HTML in this regard and does allow for an `aria-disabled` attribute to be specified on an element with an explicit `role=link`. If an author were to specify an `aria-disabled=true` on an HTML hyperlink, user agents would not functionally treat the hyperlink any differently (it would still be clickable/operable), however it would be exposed to assistive technologies as being in the disabled state.

Similarly, while native HTML `option` elements that are descendants of a `select` can only be set as being `selected`, elements with an explicit `option` role can not only allow the equivalent `aria-selected`, but also the `aria-checked` attribute, supporting widgets/constructs that go beyond the capabilities of a native `select` element.

Unfortunately, in these situations where ARIA and HTML have feature parity, but diverge in allowances, it can create for a misalignment in support, if not also user experiences. In situations where ARIA allows a feature not supported by HTML, it will often be in the author's and ultimately the user's best interest to instead implement as a fully custom ARIA widget.

In the following example, a hyperlink needs to be communicated as being in the disabled state. HTML does not allow for the use of the `disabled` attribute on a hyperlink, and using `aria-disabled=true` would communicate the hyperlink as being disabled to assistive technologies, but would not actually disable the element. The most effective way to both communicate and actually disable a hyperlink would be to remove the `href` from the [^a^] element, creating a placeholder. Then, ARIA can be applied to this placeholder link to communicate the element's intended role and state.

      <a role=link aria-disabled=true>...</a>
      

Author guidance to avoid incorrect use of ARIA

Avoid overriding interactive elements with non-interactive roles

ARIA is useful for revising or correcting the role of an element when a different role is necessary to expose to users. However, it is rarely in the user or author's best interest to try and use ARIA to override an interactive element, for instance a `button`, with a role generally exposed by a non-interactive element. For instance, a heading.

As an example, the following uses a `role=heading` on a [^button^] element. This is not allowed, because the `button` element has default functionality that conflicts with user expectations for the heading role.

          <button role="heading">search</button>
        

An author would need to take additional steps to ensure the default functionality and presentation of the `button` was removed, and even doing so may still not be enough to fully supress the element's implicit features depending on how the user chooses to engage with the web page. E.g., by turning on Windows high contrast themes, or viewing the web page in a browser's reader mode.

Avoid specifying redundant roles

The following example illustrates a [^button^] element which has also been provided an explicit `role=button`. Specifying this role is unnecessary, as a "button" element is already exposed with an implicit `button` role. In practice this particular instance of redundancy will likely not have unforeseen side effects, other than unnecessarily making the markup more verbose, and incorrectly signaling to other authors that this practice is useful. Please review the section [[[#side-effects]]] for an example of where specifying unnecessary roles can be problematic.

          <!-- Avoid doing this! -->
          <button role="button">...</button>
        

Similarly, the following uses a `role=group` on a [^fieldset^] element, and a `role=Main` on a [^main^] element. This is unnecessary, because the `fieldset` element is implicitly exposed as a `role=group`, as is the `main` element implicitly exposed as a `role=main`. Again, in practice this will likely not have any unforeseen side effects to users of assistive technology, as long as the declaration of the `role` value uses [=ASCII lowercase=]. Please see [[[#case-sensitivity]]] for more information.

          <!-- Avoid doing this! -->
          <fieldset role="group">...</fieldset>
          <!-- or this! -->
          <main role="Main">...</main>
        

The following uses a `role=list` on an [^ul^] element. As the `ul` element has an implicit role of `list`, explicitly adding the role would generally be considered redundant. However, some user agents suppress a list's implicit ARIA semantics if the list markers are removed from the visual presentation of the list items. Generally the redundant declaration of an element's implicit role would not be recommended, but in specific situations such as this, and where the role is necessary to expose, authors can explicitly add the role.

          <!-- Generally avoid doing this! -->
          <ul role="list">...</ul>
        

Be cautious of side effects

The following uses a `role=button` on a [^summary^] element. This is unnecessary and can result in cross-platform issues. For instance, preventing the element from correctly exposing its state, and forcing the role of `button`, when it might otherwise be exposed with a platform or browser specific role.

          <details>
            <!-- Avoid doing this! -->
            <summary role="button">more information</summary>
            ...
          </details>
        

Adhere to the rules of ARIA

[[[wai-aria-1.2]]] defines a number of roles which are not meant to be used by authors. Many of these roles are categorized as Abstract Roles which are explicitly stated as not to be used by authors. The following example illustrates the invalid use of an abstract `select` role, where an author likely meant to use the `combobox` role instead.

          <!-- Do not do this! -->
          <div role="select" ...>...</div>
        

ARIA also defines a `generic` role which is meant to provide feature parity with a number of HTML elements that do not have more specific ARIA semantics of their own. For instance, HTML's [^div^] and [^span^] elements, among others. ARIA discourages authors from using the `generic` role as its intended purpose is for use by implementors of user agents.

In the following example, rather than using a `generic` role, authors are advised to use a `div` in place of the `article` element. If changing the HTML element is not possible, specifying a role of `presentation` or `none` would be acceptable alternaties to remove the implicit role of the `article`.

          <!-- Avoid doing this! -->
          <article role="generic" ...>...</article>
        

Additionally, ARIA specifically mentions in Conflicts with Host Language Semantics that if authors use both native HTML features for exposing states and properties as well as their ARIA counterparts, then the host language features take priority over the explicit ARIA attributes that are also used.

For instance, in the following example an author is using HTML's `input type=checkbox` and has specified an `aria-checked=true`. However, user agents are meant to ignore the `aria-checked` attribute. Instead user agents would expose the state based on the native features of the form control.

          <!-- Do not do this! -->
          <input type="checkbox" checked aria-checked="false">
        

Adhere to the rules of HTML

While ARIA can be used to alter the way HTML features are exposed to users of assistive technologies, these modifications do not change the underlying parsing and allowed content models of HTML. For instance, a [^div^] allows an author to specify any role on it. However, this does not mean that the element can then be used in a way that deviates from the rules HTML has defined for the element.

For instance, in the following example an author has specified a role of `link` on a `div` element. While HTML allows for a hyperlink (exposed as a `role=link`) to be a descendant of a `p` element, the HTML parser does not allow a `div` to be a descendant of a `p` element.

          <!-- Do not do this! -->
          <p>
            ... <div role=link tabindex=0>...</div> ... 
          </p>
        

The HTML parser will modify the above markup to be output as the following:

          <!-- The previous example's markup will render as follows -->
          <p>...</p>
          <div role=link tabindex=0>...</div> 
          ... 
          <p></p>
          
          <!-- Instead of a div, use a span. Spans are allowed descendants of p elements! -->
          <p>
            ... <span role=link tabindex=0>...</span> ...
          </p>
        

While this specification indicates the allowed ARIA attributes that can be specified on each HTML element, this example illustrates that even if a role is allowed, the context in which it is used can still result in potential rendering and accessibility issues.

Document conformance requirements for use of ARIA attributes in HTML

The following table provides normative per-element document conformance requirements for the use of ARIA markup in HTML documents. Additionally, it identifies the implicit ARIA semantics that apply to [=HTML elements=]. The implicit ARIA semantics of these elements are defined in [[html-aam-1.0|HTML AAM]].

Each language feature (element) in a cell in the first column implies the ARIA semantics (role, states, and properties) given in the cell in the second column of the same row. The third cell in each row defines the ARIA `role` values and `aria-*` attributes which authors MAY specify on the element. Where a cell in the third column includes the term Any `role` it indicates that any `role` value MAY be used on the element. However, it is NOT RECOMMENDED for authors to specify the implicit role of the element, the `generic` role, or a role deprecated by ARIA on these elements. If a cell in the third column includes the term No `role` it indicates that authors MUST NOT overwrite the implicit ARIA semantics, or native semantics of the HTML element.

[[wai-aria-1.2|WAI-ARIA]] identifies roles which have prohibited states and properties. These roles do not allow certain WAI-ARIA attributes to be specified by authors. HTML elements which expose these implicit WAI-ARIA roles also prohibit authors from specifying these WAI-ARIA attributes.

Elements which are identified as Naming prohibited are those which authors MUST NOT specify an `aria-label` or `aria-labelledby` attribute, unless the element allows for its implicit role to be overwritten by an explicit WAI-ARIA role which allows naming from authors. For more information see [[[#docconformance-naming]]].

While setting an ARIA `role` and/or `aria-*` attribute that matches the implicit ARIA semantics is NOT RECOMMENDED, in some situations explicitly setting these attributes can be helpful – for instance, for user agents that do not expose implicit ARIA semantics for certain elements.

While it is conforming to use [[[dpub-aria-1.0]]] `role` values as outlined in the following table, the current support for exposing the semantics of these values to users of assistive technology is close to non-existent.

Rules of ARIA attribute usage by HTML element
HTML element

Implicit ARIA semantics (explicitly assigning these in markup is NOT RECOMMENDED)

ARIA role, state and property allowances
[^a^] with [^a/href^] role=link

Roles: `button`, `checkbox`, `menuitem`, `menuitemcheckbox`, `menuitemradio`, `option`, `radio`, `switch`, `tab` or `treeitem`. (link is also allowed, but NOT RECOMMENDED.)

DPub Roles: `doc-backlink`, `doc-biblioref`, `doc-glossref` or `doc-noteref`

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

It is NOT RECOMMENDED to use `aria-disabled="true"` on an `a` element with an `href` attribute.

If a link needs to be programmatically communicated as "disabled", remove the `href` attribute.
[^a^] without [^a/href^] role=generic

Any `role`, though generic SHOULD NOT be used.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^abbr^] No corresponding role

Any `role`

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^address^] role=group

Any `role`, though `group` SHOULD NOT be used.

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^area^] with [^area/href^] role=link

No `role` other than link, which is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the `link` role.

[^area^] without [^area/href^] role=generic

Roles: `button` or `link`. (generic is also allowed, but SHOULD NOT BE USED.)

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^article^] role=article

Roles: `application`, `document`, `feed`, `main`, `none`, `presentation` or `region`. (article is also allowed, but NOT RECOMMENDED.)

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^aside^] role=complementary

Roles: `feed`, `none`, `note`, `presentation`, `region` or `search`. (complementary is also allowed, but NOT RECOMMENDED.)

DPub Roles: `doc-dedication`, `doc-example`, `doc-footnote`, `doc-glossary`, `doc-pullquote` or `doc-tip`

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^audio^] No corresponding role

Role: `application`

Global `aria-*` attributes and any `aria-*` attributes applicable to the `application` role.

autonomous custom element

Role exposed from author defined {{ElementInternals}}

Otherwise role=generic

If role defined by `ElementInternals`, no `role`

Otherwise, any `role`, though generic SHOULD NOT be used.

Naming Prohibited if exposed as the `generic` role, or if exposed as another role which prohibits naming.

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^b^] role=generic

Any `role`, though generic SHOULD NOT be used.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^base^] No corresponding role

No `role` or `aria-*` attributes

[^bdi^] role=generic

Any `role`, though generic SHOULD NOT be used.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^bdo^] role=generic

Any `role`, though generic SHOULD NOT be used.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^blockquote^] role=`blockquote`

Any `role`, though `blockquote` is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^body^] role=generic

No `role` other than generic, which SHOULD NOT be used.

Naming Prohibited

Otherwise, global `aria-*` attributes allowed for the `generic` role, with the exception that authors MUST NOT specify `aria-hidden=true` on the `body` element.

[^br^] No corresponding role

Roles: `none` or `presentation`

Authors MAY specify the `aria-hidden` attribute on the `br` element. Otherwise, no other allowed `aria-*` attributes.

[^button^] role=button

Roles: `checkbox`, `combobox`, `gridcell`, `link`, `menuitem`, `menuitemcheckbox`, `menuitemradio`, `option`, `radio`, `separator`, `slider`, `switch`, `tab`, or `treeitem`. (button is also allowed, but NOT RECOMMENDED.)

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^canvas^] No corresponding role

Any `role`

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^caption^] role=`caption`

No `role` other than `caption`, which is NOT RECOMMENDED.

Naming Prohibited

Otherwise, global `aria-*` attributes.

[^cite^] No corresponding role

Any `role`

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^code^] role=`code`

Any `role`, though `code` is NOT RECOMMENDED.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^col^] No corresponding role

No `role` or `aria-*` attributes

[^colgroup^] No corresponding role

No `role` or `aria-*` attributes

[^data^] role=generic

Any `role`, though generic SHOULD NOT be used.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^datalist^] role=listbox

No `role` other than listbox, which is NOT RECOMMENDED.

No `aria-*` attributes.

[^dd^] No corresponding role

No `role`

Global `aria-*` attributes and any `aria-*` attributes applicable to the `definition` role.

[^del^] role=`deletion`

Any `role`, though `deletion` is NOT RECOMMENDED.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^details^] role=group

No `role` other than group, which is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the `group` role.

[^dfn^] role=term

Any `role`, though term is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^dialog^] role=dialog

Role: `alertdialog`. (dialog is also allowed, but NOT RECOMMENDED.)

Global `aria-*` attributes and any `aria-*` attributes applicable to the `dialog` role.

[^div^] role=generic

If a direct child of a [^dl^] element, only `presentation` or `none`. Otherwise, any `role`, though generic SHOULD NOT be used.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^dl^] No corresponding role

Roles: `group`, `list`, `none` or `presentation`

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^dt^] No corresponding role

Role: `listitem`

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^em^] role=`emphasis`

Any `role`, though `emphasis` is NOT RECOMMENDED.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^embed^] No corresponding role

Roles: `application`, `document`, `img`, `none` or `presentation`.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^fieldset^] role=group

Roles: `none`, `presentation` or `radiogroup`. (group is also allowed, but NOT RECOMMENDED.)

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^figcaption^] No corresponding role

Roles: `group`, `none` or `presentation`

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^figure^] role=figure

If the `figure` has no `figcaption` descendant:
Any `role`, though figure is NOT RECOMMENDED.

If the `figure` has a `figcaption` descendant:
DPub Role: `doc-example`.

Otherwise, figure is allowed, but NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^footer^]

If not a descendant of an `article`, `aside`, `main`, `nav` or `section` element, or an element with `role=article`, `complementary`, `main`, `navigation` or `region` then role=contentinfo

Otherwise, role=generic

Roles: `group`, `presentation` or `none`. (If not a descendant of an `article`, `aside`, `main`, `nav` or `section` element, or an element with `role=article`, `complementary`, `main`, `navigation` or `region`, then role=contentinfo is also allowed, but NOT RECOMMENDED. Otherwise, role=generic is also allowed, but SHOULD NOT be used.)

DPub Role: `doc-footnote`

Naming Prohibited if exposed as `generic`.

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^form^]

role=form

Roles: `none`, `presentation` or `search`. (form is also allowed, but NOT RECOMMENDED.)

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

A `form` is not exposed as a landmark region unless it has been provided an accessible name.

form-associated custom element

Role exposed from author defined {{ElementInternals}}

Otherwise role=generic

If role defined by `ElementInternals`, no `role`

Otherwise, form-related roles: `button`, `checkbox`, `combobox`, `listbox`, `progressbar`, `group`, `radio`, `radiogroup`, `searchbox`, `slider`, `spinbutton`, `switch` or `textbox`. (generic is also allowed, but SHOULD NOT be used.)

Naming Prohibited if exposed as the `generic` role.

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

`h1 to h6` role=heading, `aria-level` = the number in the element's tag name

Roles: `none`, `presentation` or `tab`. (heading is also allowed, but NOT RECOMMENDED.)

DPub Role: `doc-subtitle`

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^head^] No corresponding role

No `role` or `aria-*` attributes

[^header^]

If not a descendant of an `article`, `aside`, `main`, `nav` or `section` element, or an element with `role=article`, `complementary`, `main`, `navigation` or `region` then role=banner

Otherwise, role=generic

Roles: `group`, `none` or `presentation`. (If not a descendant of an `article`, `aside`, `main`, `nav` or `section` element, or an element with `role=article`, `complementary`, `main`, `navigation` or `region`, then role=banner is also allowed, but NOT RECOMMENDED. Otherwise, role=generic is also allowed, but SHOULD NOT be used.)

Naming Prohibited if exposed as `generic`.

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^hgroup^] role=group

Any `role`, though `group` SHOULD NOT be used.

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^hr^] role=separator

Roles: `none` or `presentation`. (separator is also allowed, but NOT RECOMMENDED.)

DPub Role: `doc-pagebreak`

Global `aria-*` attributes and any `aria-*` attributes applicable to the `separator` role.

[^html^] role=document

No `role` other than document, which is NOT RECOMMENDED.

No `aria-*` attributes.

[^i^] role=generic

Any `role`, though generic SHOULD NOT be used.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^iframe^] No corresponding role

Roles: `application`, `document`, `img`, `none` or `presentation`.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^img^] with an accessible name.
If the `img` has non-empty [^img/alt^] (`alt="some text"`) or an accessible name is provided another `img` naming method:
role=img

Roles: `button`, `checkbox`, `link`, `menuitem`, `menuitemcheckbox`, `menuitemradio`, `meter`, `option`, `progressbar`, `radio`, `scrollbar`, `separator`, `slider`, `switch`, `tab` or `treeitem`. (img is also allowed, but NOT RECOMMENDED.)

DPub Role: `doc-cover`

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^img^] with no accessible name.

If the `img` has an empty `alt` ([^img/alt^]`=""`) and lacks any other `img` naming methods:
role=none, role=presentation

If the `img` lacks an `alt` attribute and lacks any other `img` naming methods:
role=img

If the `img` has no `alt` attribute or accessible name: No `role` other than the role=none or presentation roles. (role=img is also allowed, but NOT RECOMMENDED.)

If the `img` has an empty `alt=""` attribute and no `aria-label` or `aria-labelledby` attributes to provide it an accessible name: No `role` other than the role=none or presentation roles, which are NOT RECOMMENDED.

No `aria-*` attributes except `aria-hidden="true"`.

Otherwise, if the `img` has an author defined accessible name, see `img` with an accessible name.

`input type=button` role=button

Roles: `checkbox`, `combobox`, `gridcell`, `link`, `menuitem`, `menuitemcheckbox`, `menuitemradio`, `option`, `radio`, `separator`, `slider`, `switch`, `tab`, or `treeitem`. (button is also allowed, but NOT RECOMMENDED.)

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

`input type=checkbox` role=checkbox

Roles: `menuitemcheckbox`, `option` or `switch`; `button` if used with `aria-pressed`. (checkbox is also allowed, but NOT RECOMMENDED.)

Authors MUST NOT use the `aria-checked` attribute on `input type=checkbox` elements.

Otherwise, any global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

The HTML [^input/checked^] attribute can be used instead of the `aria-checked` attribute for `menuitemcheckbox`, `option` or `switch` roles when used on `type=checkbox`.

`input type=color` No corresponding role

No `role`

Global `aria-*` attributes and `aria-disabled` attribute.

`input type=date` No corresponding role

No `role`

Global `aria-*` attributes and any `aria-*` attributes applicable to the `textbox` role.

`input type=datetime-local` No corresponding role

No `role`

Global `aria-*` attributes and any `aria-*` attributes applicable to the `textbox` role.

`input type=email` with no [^input/list^] attribute role=textbox

No `role` other than textbox, which is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the `textbox` role.

`input type=file` No corresponding role

No `role`

Global `aria-*` attributes, `aria-disabled`, `aria-invalid` and `aria-required` attributes.

`input type=hidden` No corresponding role

No `role` or `aria-*` attributes

`input type=image` role=button

The following roles are allowed, but are NOT RECOMMENDED: `button`, `checkbox`, `gridcell`, `link`, `menuitem`, `menuitemcheckbox`, `menuitemradio`, `option`, `radio`, `separator`, `slider`, `switch`, `tab` or `treeitem`.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

If possible, authors SHOULD consider using a different HTML element which allows the specified role, such as the `button` element.

`input type=month` No corresponding role

No `role`

Global `aria-*` attributes and any `aria-*` attributes applicable to the `textbox` role.

`input type=number` role=spinbutton

No `role` other than spinbutton, which is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the `spinbutton` role.

`input type=password` No corresponding role

No `role`

Global `aria-*` attributes and any `aria-*` attributes applicable to the `textbox` role.

`input type=radio` role=radio

Role: `menuitemradio`. (radio is also allowed, but NOT RECOMMENDED.)

Authors MUST NOT use the `aria-checked` attribute on `input type=radio` elements.

Otherwise, any global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

The HTML [^input/checked^] attribute can be used instead of the `aria-checked` attribute for the `menuitemradio` role when used on `type=radio`.

`input type=range` role=slider

No `role` other than slider, which is NOT RECOMMENDED.

Authors SHOULD NOT use the `aria-valuemax` or `aria-valuemin` attributes on `input type=range`.

Otherwise, any global `aria-*` attributes and any other `aria-*` attributes applicable to the `slider` role.

`input type=reset` role=button

The following roles are allowed, but are NOT RECOMMENDED: `button`, `checkbox`, `combobox`, `gridcell`, `link`, `menuitem`, `menuitemcheckbox`, `menuitemradio`, `option`, `radio`, `separator`, `slider`, `switch`, `tab` or `treeitem`.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

If possible, authors SHOULD consider using a different HTML element which allows the specified role, such as the `button` element.

`input type=search`, with no [^input/list^] attribute role=searchbox

No `role` other than searchbox, which is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the `searchbox` role.

`input type=submit` role=button

The following roles are allowed, but are NOT RECOMMENDED: `button`, `checkbox`, `combobox`, `gridcell`, `link`, `menuitem`, `menuitemcheckbox`, `menuitemradio`, `option`, `radio`, `separator`, `slider`, `switch`, `tab` or `treeitem`.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

If possible, authors SHOULD consider using a different HTML element which allows the specified role, such as the `button` element.

`input type=tel`, with no [^input/list^] attribute role=textbox

No `role` other than textbox, which is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the `textbox` role.

`input type=text` or with a missing or invalid `type`, with no [^input/list^] attribute role=textbox

Roles: `combobox`, `searchbox` or `spinbutton`. (textbox is also allowed, but NOT RECOMMENDED.)

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

`input type=text`, `search`, `tel`, `url`, `email`, or with a missing or invalid `type`, with a [^input/list^] attribute role=combobox

No `role` other than combobox, which is NOT RECOMMENDED.

Authors SHOULD NOT use the `aria-haspopup` attribute on the indicated `input`s with a `list` attribute.

Otherwise, any global `aria-*` attributes and any other `aria-*` attributes applicable to the `combobox` role.

`input type=time` No corresponding role

No `role`

Global `aria-*` attributes and any `aria-*` attributes applicable to the `textbox` role.

`input type=url` with no [^input/list^] attribute role=textbox

No `role` other than textbox, which is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the `textbox` role.

`input type=week` No corresponding role

No `role`

Global `aria-*` attributes and any `aria-*` attributes applicable to the `textbox` role.

[^ins^] role=`insertion`

Any `role`, though `insertion` is NOT RECOMMENDED.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^kbd^] No corresponding role

Any `role`

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^label^] No corresponding role

No `role`

Naming Prohibited

Otherwise, global `aria-*` attributes.

[^legend^] No corresponding role

No `role`

Naming Prohibited

Otherwise, global `aria-*` attributes.

[^li^]

If the `li` is a child of a list element (`ul`, `ol`, `menu`) role=listitem.

Otherwise, if the `li` is not a child of a list element it is exposed as a role=generic.

No `role` other than listitem, which is NOT RECOMMENDED, if the parent list element has an implicit or explicit `list` role.

Otherwise, any `role` if the parent list element does not expose an implicit or explicit `list` role.

See `ul`, `ol`, or `menu` for allowed roles for list elements.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

Authors SHOULD NOT use the following deprecated DPub Roles: `doc-biblioentry`, `doc-endnote`.

[^link^] No corresponding role

No `role` or `aria-*` attributes

[^main^] role=main

No `role` other than main, which is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the `main` role.

[^map^] No corresponding role

No `role` or `aria-*` attributes

[^mark^] No corresponding role

Any `role`

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

`math` role=math

No `role` other than math, which is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the `math` role.

[^menu^] role=list

Roles: `group`, `listbox`, `menu`, `menubar`, `none`, `presentation`, `radiogroup`, `tablist`, `toolbar` or `tree`. (list is also allowed, but NOT RECOMMENDED.)

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

Authors SHOULD NOT use deprecated `directory` role.

[^meta^] No corresponding role

No `role` or `aria-*` attributes

[^meter^] role=`meter`

No `role` other than `meter`, which is NOT RECOMMENDED.

Authors SHOULD NOT use the `aria-valuemax` or `aria-valuemin` attributes on `meter` elements.

Otherwise, any global `aria-*` attributes and any other `aria-*` attributes applicable to the `meter` role.

[^nav^] role=navigation

Roles: `menu`, `menubar`, `none`, `presentation` or `tablist`. (navigation is also allowed, but NOT RECOMMENDED.)

DPub Roles: `doc-index`, `doc-pagelist` or `doc-toc`

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^noscript^] No corresponding role

No `role` or `aria-*` attributes

[^object^] No corresponding role

Roles: `application`, `document` or `img`.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^ol^] role=list

Roles: `group`, `listbox`, `menu`, `menubar`, `none`, `presentation`, `radiogroup`, `tablist`, `toolbar` or `tree`. (list is also allowed, but NOT RECOMMENDED.)

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

Authors SHOULD NOT use deprecated `directory` role.

[^optgroup^] role=group

No `role` other than group, which is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the `group` role.

[^option^] element that is in a list of options or that represents a suggestion in a [^datalist^] role=option

No `role` other than option, which is NOT RECOMMENDED.

Authors SHOULD NOT use the `aria-selected` attribute on the `option` element.

Global `aria-*` attributes and any other `aria-*` attributes applicable to the `option` role.

[^output^] role=status

Any `role`, though status is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^p^] role=`paragraph`

Any `role`, though `paragraph` is NOT RECOMMENDED.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^param^] No corresponding role

No `role` or `aria-*` attributes

[^picture^] No corresponding role

No `role`

Authors MAY specify the `aria-hidden` attribute on the `picture` element. Otherwise, no other allowed `aria-*` attributes.

[^pre^] role=generic

Any `role`, though generic SHOULD NOT be used.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^progress^] role=progressbar

No `role` other than progressbar, which is NOT RECOMMENDED.

Authors SHOULD NOT use the `aria-valuemax` attribute on `progress` elements.

Otherwise, any global `aria-*` attributes and any other `aria-*` attributes applicable to the `progressbar` role.

[^q^] role=generic

Any `role`, though generic SHOULD NOT be used.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^rp^] No corresponding role

Any `role`

Naming Prohibited

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^rt^] No corresponding role

Any `role`

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^ruby^] No corresponding role

Any `role`

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^s^] role=`deletion`

Any `role`, though `deletion` is NOT RECOMMENDED.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^samp^] role=generic

Any `role`, though generic SHOULD NOT be used.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^script^] No corresponding role

No `role` or `aria-*` attributes

[^search^]

role=search

Roles: `form`, `group`, `none`, `presentation` or `region`. (search is also allowed, but NOT RECOMMENDED.)

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^section^]

role=region if the [^section^] element has an accessible name

Otherwise, role=generic

Roles: `alert`, `alertdialog`, `application`, `banner`, `complementary`, `contentinfo`, `dialog`, `document`, `feed`, `group`, `log`, `main`, `marquee`, `navigation`, `none`, `note`, `presentation`, `search`, `status` or `tabpanel`. (role=region is also allowed, but NOT RECOMMENDED. role=generic SHOULD NOT be used.)

DPub Roles: `doc-abstract`, `doc-acknowledgments`, `doc-afterword`, `doc-appendix`, `doc-bibliography`, `doc-chapter`, `doc-colophon`, `doc-conclusion`, `doc-credit`, `doc-credits`, `doc-dedication`, `doc-endnotes`, `doc-epigraph`, `doc-epilogue`, `doc-errata`, `doc-example`, `doc-foreword`, `doc-glossary`, `doc-index`, `doc-introduction`, `doc-notice`, `doc-pagelist`, `doc-part`, `doc-preface`, `doc-prologue`, `doc-pullquote`, `doc-qna`, `doc-toc`

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^select^] (with NO `multiple` attribute and NO `size` attribute having value greater than `1`) role=combobox

Role: `menu`. (combobox is also allowed, but NOT RECOMMENDED.)

Authors SHOULD NOT use the `aria-multiselectable` attribute on a `select` element.

Otherwise, any global `aria-*` attributes and any other `aria-*` attributes applicable to the `combobox` or `menu` role.

[^select^] (with a `multiple` attribute or a `size` attribute having value greater than `1`) role=listbox

No `role` other than listbox, which is NOT RECOMMENDED.

Authors SHOULD NOT use the `aria-multiselectable` attribute on a `select` element.

Otherwise, any global `aria-*` attributes and any other `aria-*` attributes applicable to the `listbox` role.

[^slot^] No corresponding role

No `role` or `aria-*` attributes

[^small^] role=generic

Any `role`, though generic SHOULD NOT be used.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^source^] No corresponding role

No `role` or `aria-*` attributes

[^span^] role=generic

Any `role`, though generic SHOULD NOT be used.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^strong^] role=`strong`

Any `role`, though `strong` is NOT RECOMMENDED.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^style^] No corresponding role

No `role` or `aria-*` attributes

[^sub^] role=`subscript`

Any `role`, though `subscript` is NOT RECOMMENDED.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^summary^]

No corresponding role

Many, but not all, user agents expose the `summary` element with an implicit ARIA role=button.

No `role` if the `summary` element is a summary for its parent details.

Global `aria-*` attributes, `aria-disabled`, and `aria-haspopup` attributes.

Otherwise, authors MAY specifiy Any `role`, and any global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^sup^] role=superscript

Any `role`, though superscript is NOT RECOMMENDED.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

`SVG` `role=graphics-document` as defined by SVG AAM

Any `role`, though `graphics-document` is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^table^] role=table

Any `role`, though table is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^tbody^] role=rowgroup

Any `role`, though rowgroup is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^td^]

role=cell if the ancestor `table` element is exposed as a `role=table`

role=gridcell if the ancestor `table` element is exposed as a `role=grid` or `treegrid`

No corresponding role if the ancestor `table` element is not exposed as a `role=table`, `grid` or `treegrid`

If the ancestor `table` element has `role=table`, `grid`, or `treegrid`, no `role` other than the following:

  • If the ancestor `table` element is exposed as a `role=table`, then cell is allowed, but NOT RECOMMENDED.
  • If the ancestor `table` element is exposed as a `role=grid` or `treegrid`, then gridcell is allowed, but NOT RECOMMENDED.

Otherwise, if the ancestor `table` element is not exposed as a `role=table`, `grid` or `treegrid`, any `role`.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^template^] No corresponding role

No `role` or `aria-*` attributes

[^textarea^] role=textbox

No `role` other than textbox, which is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the `textbox` role.

[^tfoot^] role=rowgroup

Any `role`, though rowgroup is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^th^]

role=columnheader, `rowheader` or `cell` if the ancestor `table` element is exposed as a `role=table`

role=columnheader, `rowheader` or `gridcell` if the ancestor `table` element is exposed as a `role=grid` or `treegrid`

No corresponding role if the ancestor `table` element is not exposed as a `role=table`, `grid` or `treegrid`

If the ancestor `table` element has `role=table`, `grid`, or `treegrid`, no `role` other than the following:

Otherwise, if the ancestor `table` element is not exposed as a `role=table`, `grid` or `treegrid`, any `role`.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^thead^] role=rowgroup

Any `role`, though rowgroup is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^time^] role=time

Any `role`, though time is NOT RECOMMENDED.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^title^] No corresponding role

No `role` or `aria-*` attributes

[^tr^] role=row

If the ancestor `table` element has `role=table`, `grid`, or `treegrid`, no `role` other than row, which is NOT RECOMMENDED; otherwise any `role`, though row is NOT RECOMMENDED.

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^track^] No corresponding role

No `role` or `aria-*` attributes

[^u^] role=generic

Any `role`, though generic SHOULD NOT be used.

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^ul^] role=list

Roles: `group`, `listbox`, `menu`, `menubar`, `none`, `presentation`, `radiogroup`, `tablist`, `toolbar` or `tree`. (list is also allowed, but NOT RECOMMENDED.)

Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

Authors SHOULD NOT use the deprecated `directory` role.

[^var^] No corresponding role

Any `role`

Naming Prohibited

Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.

[^video^] No corresponding role

Role: `application`

Global `aria-*` attributes and any `aria-*` attributes applicable to the `application` role.

[^wbr^] No corresponding role

Roles: `none` or `presentation`

Authors MAY specify the `aria-hidden` attribute on the `wbr` element. Otherwise, no other allowed `aria-*` attributes.

The elements marked with No corresponding role, in the second column of the table do not have any implicit ARIA semantics, but they do have meaning and this meaning may be represented in roles, states and properties not provided by ARIA, and exposed to users of assistive technology via accessibility APIs. It is therefore recommended that authors add a `role` attribute to a semantically neutral element such as a [^div^] or [^span^], rather than overriding the semantics of the listed elements.

Authors are encouraged to make use of the following documents for guidance on using ARIA in HTML beyond that which is provided here:

Requirements for use of ARIA attributes to name elements

Authors MAY use `aria-label` and `aria-labelledby` attributes to specify accessible names for elements which have an implicit or explicit ARIA role which allows naming from authors. [[[wai-aria-1.2]]] defines roles which allow naming from authors as well as roles where author naming is prohibited.

Authors MUST NOT specify `aria-label` or `aria-labelledby` on elements with implicit WAI-ARIA roles which cannot be named. HTML elements whose implicit WAI-ARIA roles prohibit naming from authors are identified in [[[#docconformance]]].

The following markup example demonstrates a selection of HTML elements with implicit ARIA roles that prohibit naming from authors.

            <!-- DO NOT do the following! -->
            <p aria-label="...">...</p>

            <span aria-label="...">...<span>

            <code aria-label="...">...<code>

            <div aria-labelledby="...">...</div>
          

The following markup example demonstrates elements which have explicit WAI-ARIA roles which allow naming from authors. Due to the explicit roles specified on these elements, `aria-label` and `aria-labelledby` attributes are allowed.

            <p role="link" tabindex="0" aria-label="...">...</p>

            <span role="button" tabindex="0" aria-label="...">...<span>

            <div role="article" aria-labelledby="...">...</div>
          

Requirements for use of ARIA attributes in place of equivalent HTML attributes

Unless otherwise stated, authors MAY use `aria-*` attributes in place of their HTML equivalents on HTML elements where the `aria-*` semantics would be expected. For example, authors MAY specify `aria-disabled=true` on a [^button^] element, while also implementing the necessary scripting to functionally disable the `button`, rather than the use `disabled` attribute.

As stated in WAI-ARIA's Conflicts with Host Language Semantics, when HTML elements use both `aria-*` attributes and their host language (HTML) equivalents, user agents MUST ignore the WAI-ARIA attributes – the native HTML attributes with the same implicit ARIA semantics take precedence. For this reason, authors SHOULD NOT specify both the native HTML attribute and the equivalent `aria-*` attribute on an element. Please review each attribute for any further author specific requirements.

The following table represents HTML elements and their attributes which have `aria-*` attribute parity.

Each language feature (element and attribute) in a cell in the first column implies the ARIA semantics (states, and properties) given in the cell in the second column of the same row. The third cell in each row defines how authors can use the native HTML feature, along with requirements for using the `aria-*` attributes that supply the same implicit ARIA semantics.

Rules of ARIA attribute usage by HTML feature
HTML feature

Implicit ARIA semantics

HTML feature and `aria-*` attribute author guidance
Any element where the [^input/checked^] attribute is allowed `aria-checked="true"`

Use the `checked` attribute on any element that is allowed the `checked` attribute in HTML. Use the `indeterminate` IDL attribute to indicate the "mixed" state for `input type=checkbox` elements.

Authors MUST NOT use the `aria-checked` attribute on any element where the checkedness, or the indeterminate checked value of the element can be in opposition to the current value of the `aria-checked` attribute.

Authors MAY use the `aria-checked` attribute on any other element with a WAI-ARIA role which allows the attribute.

Any element where the [^input/disabled^] attribute is allowed, including `option` [^option/disabled^] and `optgroup` [^optgroup/disabled^] `aria-disabled="true"`

Use the `disabled` attribute on any element that is allowed the `disabled` attribute in HTML.

Authors MAY use the `aria-disabled` attribute on any element that is allowed the `disabled` attribute in HTML, or any element with a WAI-ARIA role which allows the `aria-disabled` attribute.

Authors SHOULD NOT use `aria-disabled="true"` on any element which also has a `disabled` attribute.

Authors MUST NOT use `aria-disabled="false"` on any element which also has a `disabled` attribute.

Any element with a [^html-global/hidden^] attribute `aria-hidden="true"`

Authors MAY use the `aria-hidden` attribute on any HTML element that allows global `aria-*` attributes, with the following exception:

Authors SHOULD NOT use the `aria-hidden="true"` attribute on any element which also has a `hidden` attribute.

Any element where the [^input/placeholder^] attribute is allowed `aria-placeholder="..."`

Use the `placeholder` attribute on any element that is allowed the `placeholder` attribute in HTML.

Authors MAY use the `aria-placeholder` attribute on any element that is allowed the `placeholder` attribute in HTML, or any element with a WAI-ARIA role which allows the `aria-placeholder` attribute.

Authors MUST NOT use the `aria-placeholder` attribute on any element which also has a `placeholder` attribute.

Any element where the `max` attribute is allowed: `meter` [^meter/max^], `progress` [^progress/max^], and `input` [^input/max^] `aria-valuemax="..."`

Use the `max` attribute on any element that is allowed the `max` attribute in HTML.

Authors MAY use the `aria-valuemax` attribute on any other element with a WAI-ARIA role which allows the `aria-valuemax` attribute.

Authors SHOULD NOT use `aria-valuemax` on any element which allows the `max` attribute. Use the `max` attribute instead.

Authors MUST NOT use `aria-valuemax` on any element which also has a `max` attribute.

Any element where the `min` attribute is allowed: `meter` [^meter/min^] and `input` [^input/min^] `aria-valuemin="..."`

Use the `min` attribute on any element that is allowed the `min` attribute in HTML.

Authors MAY use the `aria-valuemin` attribute on any other element with a WAI-ARIA role which allows the `aria-valuemin` attribute.

Authors SHOULD NOT use `aria-valuemin` on any element which allows the `min` attribute. Use the `min` attribute instead.

Authors MUST NOT use `aria-valuemin` on any element which also has a `min` attribute.

Any element which allows the `readonly` attribute: `input` [^input/readonly^], `textarea` [^textarea/readonly^] and form-associated custom element which allows [^form-associated custom elements/readonly^] `aria-readonly="true"`

Use the `readonly` attribute on any element that is allowed the `readonly` attribute in HTML.

Authors MAY use the `aria-readonly` attribute on any element with a WAI-ARIA role which allows the attribute.

Authors SHOULD NOT use the `aria-readonly="true"` on any element which also has a `readonly` attribute.

Authors MUST NOT use `aria-readonly="false"` on any element which also has a `readonly` attribute.

Element with [^html-global/contenteditable^]`=true` or element without `contenteditable` attribute whose closest ancestor with a `contenteditable` attribute has `contenteditable="true"`.

This is equivalent to the `isContentEditable` IDL attribute.

`aria-readonly="false"` Authors MUST NOT set `aria-readonly="true"` on an element that has `isContentEditable="true"`.
Any element where the `required` attribute is allowed: `input` [^input/required^], `textarea` [^textarea/required^], and `select` [^select/required^] `aria-required="true"`

Use the `required` attribute on any element that is allowed the `required` attribute in HTML.

Authors MAY use the `aria-required` attribute on any element that is allowed the `required` attribute in HTML, or any element with a WAI-ARIA role which allows the `aria-required` attribute.

Authors SHOULD NOT use the `aria-required="true"` on any element which also has a `required` attribute.

Authors MUST NOT use `aria-required="false"` on any element which also has a `required` attribute.

Any element where the [^th/colspan^] attribute is allowed: `td` and `th` `aria-colspan="..."`

Use the `colspan` attribute on any element that is allowed the `colspan` attribute in HTML.

Authors SHOULD NOT use the `aria-colspan` attribute on any element which also has a `colspan` attribute.

Authors MUST NOT use `aria-colspan` on any element which also has a `colspan` attribute, and the values of each attribute do not match.

Any element where the [^th/rowspan^] attribute is allowed: `td` and `th` `aria-rowspan="..."`

Use the `rowspan` attribute on any element that is allowed the `rowspan` attribute in HTML.

Authors SHOULD NOT use the `aria-rowspan` attribute on any element which also has a `rowspan` attribute.

Authors MUST NOT use `aria-rowspan` on any element which also has a `rowspan` attribute, and the values of each attribute do not match.

Requirements for deprecated ARIA role, state and property and attributes

The ARIA Specification's Deprecated Requirements section indicates that if an ARIA feature is marked as deprecated then authors are advised not to use said feature for new content.

The following roles and attributes are deprecated features of ARIA and DPub ARIA. Conformance checkers MUST warn authors about the deprecated status of these features. Whenever possible, authors are advised to use alternatives to deprecated features.

Deprecated ARIA roles

The `directory` role is marked for deprecation in [[wai-aria-1.2|WAI-ARIA 1.2]]. In reality, the `directory` role had no functional difference to an element with an implicit or explicit `list` role. Authors are advised to use one of HTML's native list elements, or an ARIA `list` instead.

Deprecated DPub ARIA roles

The `doc-biblioentry` and `doc-endnote` roles are marked for deprecation in [[[dpub-aria-1.1]]], as they are not valid children for an element with an implicit or explicit role of `list`. Authors can use standard list and child `li` elements without the need for these roles.

Deprecated ARIA attributes

The `aria-dropeffect` and `aria-grabbed` attributes were deprecated in [[wai-aria-1.1|WAI-ARIA 1.1]]. There is presently no feature in ARIA to replace their proposed functionality.

Case requirements for ARIA role, state and property attributes

Authors SHOULD use [=ASCII lowercase=] for all `role` token values and any state or property attributes (`aria-*`) whose values are defined as tokens.

While modern browsers treat the `role` or `aria-*` attribute values as [=ASCII case-insensitive=], not all assistive technologies will correctly parse these values.

To reduce interoperability issues, authors are strongly encouraged to use [=ASCII lowercase=] for `aria-*` and `role` attribute values. Further, authors are encouraged to rigorously test with different browser and assistive technology combinations to ensure that their content will be correctly exposed to their users.

Allowed descendants of ARIA roles

The following table maps (and extends) the Kinds of content and allowed descendant information (defined in the [[HTML]] specification) to elements that have an equivalent `role`.

Column 1 links to the normative [[[wai-aria-1.2]]] definitions for each ARIA `role`. Column 2 identifies the Kinds of content categories each `role` has when it is used on an HTML element. Column 3 indicates what kinds of HTML elements can be descendants of an element with an explicit `role` specified, often matching the HTML element with the same implicit role.

For example, a [^button^] element has an implicit `role=button`. In HTML a `button` element allows [=phrasing content=] as descendants, and does not allow [=interactive content=] or descendants with a `tabindex` attribute. Therefore, any elements specified with a `role=button` would follow the same descendant restrictions, and not allow any interactive content descendants, elements with a `tabindex` specified, or any elements with role values that are in the interactive content category (identified in column 3).

Examples of non-conforming descendants
<!-- conformance checkers will report an error -->
<button>
  <div role="button">...</div>
</button>

<div role="button">
  <button>...</button>
</div>

<div role="link">
  <textarea>...</textarea>
</div>
        

Additionally, there are certain roles which [[[wai-aria-1.2]]] has specified specific requirements for their allowed descendants. These have been identified in column 3 (Descendant allowances) by indicating to "Refer to the 'Required Owned Elements'" for those particular roles.

Allowed descendants of ARIA roles
Role Kind of content Descendant allowances
`alert` [=Flow content=] [=Flow content=] but with no main element descendants.
`alertdialog` [=Flow content=] [=Flow content=]
`application` [=Flow content=] [=Flow content=]
`article`
  • [=Flow content=]
  • [=Sectioning content=]
  • [=Palpable content=]
[=Flow content=] but with no main element descendants.
`banner`
  • [=Flow content=]
  • [=Palpable content=]
[=Flow content=] but with no main, header, or footer element descendants.
`blockquote`
  • [=Flow content=]
  • [=Palpable content=]
[=Flow content=] but with no main element descendants.
`button`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Interactive content=]
  • [=Palpable content=]
[=Phrasing content=], but with no [=interactive content=] descendants, and no descendants with a `tabindex` attribute specified.
`caption` N/A [=Flow content=] but with no main or table element descendants.
`cell` N/A [=Flow content=] but with no main element descendants.
`checkbox`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Interactive content=]
[=Phrasing content=], but with no [=interactive content=] descendants, and no descendants with a `tabindex` attribute specified.
`code`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Palpable content=]
[=Phrasing content=]
`columnheader` N/A [=Flow content=] but with no main, header, or footer element descendants.
`combobox`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Interactive content=]
  • [=Palpable content=]
[=Flow content=] but with no main element descendants.
`complementary`
  • [=Flow content=]
  • [=Sectioning content=]
  • [=Palpable content=]
[=Flow content=] but with no main element descendants.
`contentinfo`
  • [=Flow content=]
  • [=Palpable content=]
[=Flow content=] but with no main, header, or footer element descendants.
`definition`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Palpable content=]
[=Phrasing content=]
`deletion`
  • [=Flow content=]
  • [=Phrasing content=]
[=Phrasing content=]
`dialog` [=Flow content=] [=Flow content=]
`directory` [=Flow content=] [=Flow content=] but with no main element descendants.
`document` [=Flow content=] [=Flow content=]
`emphasis`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Palpable content=]
[=Phrasing content=]
`feed` [=Flow content=] [=Flow content=] but with no main element descendants.
`figure`
  • [=Flow content=]
  • [=Palpable content=]
[=Flow content=] but with no main element descendants.
`form`
  • [=Flow content=]
  • [=Palpable content=]
[=Flow content=], but with no [^form^] element descendants.
`generic`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Palpable content=]
[=Flow content=]
`grid`
  • [=Flow content=]
  • [=Interactive content=]
  • [=Palpable content=]
Refer to the "Required Owned Elements" as defined for the ARIA `grid` role.
`gridcell` [=Interactive content=] [=Flow content=] but with no main element descendants.
`group`
  • [=Flow content=]
  • [=Palpable content=]
[=Flow content=]
`heading`
  • [=Flow content=]
  • [=Heading content=]
  • [=Palpable content=]
[=Phrasing content=]
`img`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Embedded content=]
  • [=Palpable content=]
[=Phrasing content=], but with no [=interactive content=] descendants.
`insertion`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Palpable content=]
[=Phrasing content=]
`link`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Interactive content=]
  • [=Palpable content=]
[=Flow content=], but with no [=interactive content=] descendants, and no descendants with a `tabindex` attribute specified.
`list` [=Flow content=] Refer to the "Required Owned Elements" as defined for the ARIA `list` role.
`listbox`
  • [=Flow content=]
  • [=Interactive content=]
  • [=Palpable content=]
Refer to the "Required Owned Elements" as defined for the ARIA `listbox` role.
`listitem` N/A [=Flow content=] but with no main element descendants.
`log` [=Flow content=] [=Flow content=], but with no main element descendants.
`main` [=Flow content=] [=Flow content=], but with no main element descendants.
`marquee` [=Flow content=] [=Flow content=], but with no main element descendants.
`math` [=Flow content=] [=Flow content=]
`menu`
  • [=Flow content=]
  • [=Interactive content=]
Refer to the "Required Owned Elements" as defined for the ARIA `menu` role.
`menubar`
  • [=Flow content=]
  • [=Interactive content=]
Refer to the "Required Owned Elements" as defined for the ARIA `menubar` role.
`menuitem` [=Interactive content=] [=Phrasing content=], but with no [=interactive content=] descendants, and no descendants with a `tabindex` attribute specified.
`menuitemcheckbox` [=Interactive content=] [=Phrasing content=], but with no [=interactive content=] descendants, and no descendants with a `tabindex` attribute specified.
`menuitemradio` [=Interactive content=] [=Phrasing content=], but with no [=interactive content=] descendants, and no descendants with a `tabindex` attribute specified.
`meter`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Palpable content=]
[=Phrasing content=], but with no meter element descendants.
`navigation`
  • [=Flow content=]
  • [=Sectioning content=]
  • [=Palpable content=]
[=Flow content=], but with no main element descendants.
`none` N/A Transparent
`note` [=Flow content=] [=Flow content=], but with no main element descendants.
`option` [=Interactive content=] [=Phrasing content=], but with no [=interactive content=] descendants, and no descendants with a `tabindex` attribute specified.
`paragraph`
  • [=Flow content=]
  • [=Palpable content=]
[=Phrasing content=]
`presentation` N/A Transparent
`progressbar`
  • [=Flow content=]
  • [=Phrasing content=]
[=Phrasing content=], but with no progress element descendants.
`radio`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Interactive content=]
[=Phrasing content=], but with no [=interactive content=] descendants, and no descendants with a `tabindex` attribute specified.
`radiogroup`
  • [=Flow content=]
  • [=Palpable content=]
[=Flow content=]
`region`
  • [=Flow content=]
  • [=Sectioning content=]
  • [=Palpable content=]
[=Flow content=], but with no main element descendants.
`row` N/A Refer to the "Required Owned Elements" as defined for the ARIA `row` role.
`rowgroup` N/A Refer to the "Required Owned Elements" as defined for the ARIA `rowgroup` role.
`rowheader` N/A [=Flow content=] but with no main element descendants.
`scrollbar` [=Interactive content=] [=Phrasing content=]
`search`
  • [=Flow content=]
  • [=Palpable content=]
[=Flow content=] but with no main element descendants.
`searchbox`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Interactive content=]
[=Flow content=] but with no main element descendants.
`separator` [=Interactive content=] (if focusable) [=Phrasing content=]
`slider`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Interactive content=]
[=Phrasing content=]
`spinbutton`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Interactive content=]
[=Flow content=] but with no main element descendants.
`status` [=Flow content=] [=Flow content=] but with no main element descendants.
`strong`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Palpable content=]
[=Phrasing content=]
`subscript`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Palpable content=]
[=Phrasing content=]
`superscript`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Palpable content=]
[=Phrasing content=]
`switch`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Interactive content=]
[=Phrasing content=], but with no [=interactive content=] descendants, and no descendants with a `tabindex` attribute specified.
`tab` [=Interactive content=] [=Phrasing content=], but with no [=interactive content=] descendants, and no descendants with a `tabindex` attribute specified.
`table`
  • [=Flow content=]
  • [=Palpable content=]
Refer to the "Required Owned Elements" as defined for the ARIA `table` role.
`tablist`
  • [=Flow content=]
  • [=Palpable content=]
Refer to the "Required Owned Elements" as defined for the ARIA `tablist` role.
`tabpanel` [=Flow content=] [=Flow content=]
`term` [=Phrasing content=] [=Phrasing content=]
`textbox` [=Interactive content=] [=Flow content=] but with no main element descendants.
`time`
  • [=Flow content=]
  • [=Phrasing content=]
  • [=Palpable content=]
[=Phrasing content=]
`timer` [=Flow content=] [=Flow content=] but with no main element descendants.
`toolbar` [=Flow content=] [=Flow content=] but with no main element descendants.
`tooltip` [=Flow content=] [=Phrasing content=]
`tree` [=Flow content=] Refer to the "Required Owned Elements" as defined for the ARIA tree role.
`treegrid` [=Flow content=] Refer to the "Required Owned Elements" as defined for the ARIA treegrid role.
`treeitem` [=Interactive content=] [=Phrasing content=]

Conformance checking requirements

Conformance checkers that claim support for checking ARIA in HTML documents MUST implement checks for the conformance requirements for use of the ARIA `role` and `aria-*` attributes on [=HTML elements=] as defined in this specification.

A conforming document MUST NOT contain any elements with author defined `role` or `aria-*` attributes with values other than those which, per this specification, authors MAY use on each [=HTML element=] in [[[#docconformance]]]. Conformance checkers SHOULD flag instances where authors are explicitly providing an element with a `role` which matches its implicit ARIA semantics as failures, as it is NOT RECOMMENDED for authors to explicitly set these roles.

A conformance checker MAY define their own terminology, and level or levels of severity, when surfacing document failures to conform to this specification.

Privacy and security considerations

This specification does not define the features of [[wai-aria-1.2]], [[dpub-aria-1.0]] or [[HTML]]. Rather it provides rules and guidance for conformance checkers that claim support for checking ARIA in HTML, as well as providing guidance to authors.

Therefore, there are no known privacy or security impacts of this specification, as it defines no new features to introduce potential concern.