ARIA Attributes
Multi-value Attribute Values
When the ARIA attribute definition includes a table listing the attribute's allowed values,
that attribute is a multi-value nullable attribute.
Each value in the table is a keyword for the attribute, mapping to a state of the same name.
IDL reflection of ARIA attributes
All ARIA attributes reflect in IDL as [=nullable type|nullable=] {{DOMString}} attributes.
This includes the boolean-like true/false type, and all other ARIA attributes.
Default values from the ARIA values tables MUST NOT reflect to IDL as the
missing value default or the
invalid value default for the attribute.
On getting, a missing ARIA attribute will return null
. ARIA attributes are not validated on get.
If an ARIA value is invalid, on getting, it will return its set value as a literal string, and will not return an invalid value default.
Operating System Accessibility API mapping of multi-value ARIA attributes
Unlike IDL reflection, operating system accessibility API mappings of ARIA attributes can have defaults.
Any default values from the ARIA values tables are exposed to the operating system accessibility API as described in
[[[#supportedState]]], and in [[[CORE-AAM]]].
ARIA nullable DOMString Attributes
As noted in [[[#typemapping]]], attributes are included in host languages, and the syntax for representation of WAI-ARIA types is governed by the host language.
The following algorithm should be used for ARIA nullable {{DOMString}} attributes in HTML:
On getting, if the corresponding content attribute is not present, then the IDL attribute must return null,
otherwise, the IDL attribute must get the value in a transparent, case-preserving manner.
On setting, if the new value is null, the content attribute must be removed, and otherwise,
the content attribute must be set to the specified new value in a transparent, case-preserving manner.
Note: As of ARIA 1.2, all ARIA attributes exposed via IDL are defined as nullable {{DOMString}}s. This matches the current implementation of all major rendering engines. This specification change should result in no implementation changes; it will merely represent the current reality of web engines.
However, in a future draft, the ARIA Working Group intends to change several ARIA attributes to non-nullable DOMStrings, and seek implementations. The proposed change will bring ARIA into alignment with the HTML’s usage of enumerated attributes.
Translatable Attributes
The HTML specification states that other specifications can define translatable attributes. The language and directionality of each attribute value is the same as the language and directionality of the element.
To be understandable by assistive technology users, the values of the following states and [=ARIA/properties=] are translatable attributes and should be translated when a page is localized:
- aria-label
- aria-placeholder
- aria-roledescription
- aria-valuetext
Global States and Properties
Some states and [=ARIA/properties=] are applicable to all host language [=elements=] regardless of whether a role is applied. The following global states and properties are supported by all roles and by all base markup elements unless otherwise prohibited. If a role prohibits use of any global states or properties, those states or properties are listed as prohibited in the characteristics table included in the section that defines the role.
Placeholder for global states and properties
Taxonomy of WAI-ARIA States and Properties
States and properties are categorized as follows:
- Widget Attributes
- Live Region Attributes
- Drag-and-Drop Attributes
- Relationship Attributes
Live Region Attributes
This section contains [=attributes=] specific to live regions in rich internet applications. These attributes may be applied to any element. The purpose of these attributes is to indicate that content changes may occur without the element having focus, and to provide assistive technologies with information on how to process those content updates. Some roles specify a default value for the aria-live attribute specific to that role. An example of a live region is a ticker section that lists updating stock quotes. User agents MAY ignore changes triggered by direct user action on an element inside a live region (e.g., editing the value of a text field).
- aria-atomic
- aria-busy
- aria-live
- aria-relevant
Drag-and-Drop Attributes
This section lists [=attributes=] which indicate information about drag-and-drop interface [=elements=], such as draggable elements and their drop targets. Drop target information will be rendered visually by the author and provided to assistive technologies through an alternate modality.
- aria-dropeffect
- aria-grabbed
Relationship Attributes
This section lists [=attributes=] that indicate relationships or associations between [=elements=] which cannot be readily determined from the document structure.
- aria-activedescendant
- aria-colcount
- aria-colindex
- aria-colspan
- aria-controls
- aria-describedby
- aria-details
- aria-errormessage
- aria-flowto
- aria-labelledby
- aria-owns
- aria-posinset
- aria-rowcount
- aria-rowindex
- aria-rowspan
- aria-setsize
Definitions of States and Properties (all aria-* attributes)
Below is an alphabetical list of WAI-ARIA states and [=ARIA/properties=] to be used by rich internet application authors. A detailed definition of each WAI-ARIA state and [=ARIA/property=] follows this compact list.
Placeholder for index of states and properties
aria-activedescendant
Identifies the currently active element when DOM focus is on a composite widget, combobox, textbox, group, or application.
The aria-activedescendant
property provides an alternative method of managing focus for interactive elements that may contain multiple focusable descendants, such as menus, grids, and toolbars. Instead of moving DOM focus among [=ARIA/owned=] elements, authors MAY set DOM focus on a container element that supports aria-activedescendant
and then use aria-activedescendant
to refer to the element that is active.
Authors MUST ensure that one of the following two sets of conditions is met when setting the value of aria-activedescendant
on an element with DOM focus:
- The value of
aria-activedescendant
refers to an [=ARIA/owned=] element. An owned element is either a descendant of the element with DOM focus or a logical descendant as indicated by the aria-owns attribute.
-
The element with DOM focus is a combobox, textbox or searchbox with aria-controls referring to an element that supports
aria-activedescendant
, and the value of aria-activedescendant
refers to an owned element of the controlled element.
For example, in a combobox, focus may remain on the combobox while the value of aria-activedescendant
on the combobox element refers to a descendant of a popup listbox that is controlled by the combobox.
Authors SHOULD also ensure that the currently active descendant is visible and in view (or scrolls into view) when focused.
Characteristics:
Characteristic |
Value |
Related Concepts: |
SVG [[SVG2]] and DOM [[DOM]] active |
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
ID reference |
aria-atomic
Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.
Both accessibility APIs and the Document Object Model [[DOM]] provide events to allow the assistive technologies to determine changed areas of the document.
When the content of a live region changes, user agents SHOULD examine the changed element and traverse the ancestors to find the first element with aria-atomic set, and apply the appropriate behavior for the cases below.
- If none of the ancestors have explicitly set aria-atomic, the default is that aria-atomic is
false
, and assistive technologies will only present the changed node to the user.
- If aria-atomic is explicitly set to
false
, assistive technologies will stop searching up the ancestor chain and present only the changed node to the user.
- If aria-atomic is explicitly set to
true
, assistive technologies will present the entire contents of the element, including the author-defined live region label if one exists.
When aria-atomic is true
, assistive technologies MAY choose to combine several changes and present the entire changed region at once.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
All elements of the base markup |
Inherits into Roles: |
Placeholder |
Value: |
true/false |
Values:
Value |
Description |
false (default) |
Assistive technologies will present only the changed node or nodes. |
true |
Assistive technologies will present the entire changed region as a whole, including the author-defined label if one exists. |
aria-autocomplete
Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for a combobox, searchbox, or textbox and specifies how predictions would be presented if they were made.
The aria-autocomplete
property describes the type of interaction model a textbox, searchbox, or combobox employs when dynamically helping users complete text input. It distinguishes between two models: the inline model (aria-autocomplete="inline"
) that presents a value completion prediction inside the text input and the list model (aria-autocomplete="list"
) that presents a collection of possible values in a separate element that pops up adjacent to the text input. It is possible for an input to offer both models at the same time (aria-autocomplete="both"
).
The aria-autocomplete
property is limited to describing predictive behaviors of an input element. Authors SHOULD either omit specifying a value for aria-autocomplete
or set aria-autocomplete
to none
if an input element provides one or more input proposals where none of the proposals are dependent on the specific input provided by the user. For instance, a combobox where the value of aria-autocomplete
would be none
is a search field that displays suggested values by listing the 5 most recently used search terms without any filtering of the list based on the user's input. Elements with a role that supports aria-autocomplete
have a default value for aria-autocomplete
of none
.
When an inline suggestion is made as a user types in an input, suggested text for completing the value of the field dynamically appears in the field after the input cursor, and the suggested value is accepted as the value of the input if the user performs an action that causes focus to leave the field. When an element has aria-autocomplete
set to inline
or both
, authors SHOULD ensure that the automatically suggested portion of the text is presented as selected text. This enables assistive technologies to distinguish between a user's input and the automatic suggestion and, in the event that the suggestion is not the desired value, enables the user to easily delete the suggestion or replace it by continuing to type.
If an element has aria-autocomplete
set to list
or both
, authors MUST ensure both of the following conditions are met:
- The element has a value specified for aria-controls that refers to the element that contains the collection of suggested values.
- The element has a value for aria-haspopup that matches the role of the element that contains the collection of suggested values.
Some implementations of the list model require the user to perform an action, such as moving focus to the suggestion with the Down Arrow or clicking on the suggestion, in order to choose the suggestion. In such implementations, authors MAY manage focus by either using aria-activedescendant if the collection container supports it or by moving DOM focus to the suggestion. However, other implementations of the list model automatically highlight one suggestion as the selected value that will be accepted when the field loses focus, e.g., when the user presses the Tab key or clicks on a different field. If an element has aria-autocomplete
set to list
or both
, and if a suggestion is automatically selected as the user provides input, authors MUST ensure all the following conditions are met:
- The collection of suggestions is presented in an element with a role that supports aria-activedescendant.
- The value of
aria-activedescendant
set on the input field is dynamically adjusted to refer to the element containing the selected suggestion as described in the definition of aria-activedescendant.
- DOM focus remains on the text input while the suggestions are displayed.
The aria-autocomplete
property is not intended to indicate the presence of a completion suggestion, and authors SHOULD NOT dynamically change its value in order to communicate the presence of a suggestion. When an element has aria-autocomplete
set to list
or both
, authors SHOULD use the aria-expanded state to communicate whether the element that presents the suggestion collection is displayed.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
token |
Values:
Value |
Description |
inline |
When a user is providing input, text suggesting one way to complete the provided input may be dynamically inserted after the caret. |
list |
When a user is providing input, an element containing a collection of values that could complete the provided input may be displayed. |
both |
When a user is providing input, an element containing a collection of values that could complete the provided input may be displayed. If displayed, one value in the collection is automatically selected, and the text needed to complete the automatically selected value appears after the caret in the input. |
none (default) |
When a user is providing input, an automatic suggestion that attempts to predict how the user intends to complete the input is not displayed. |
aria-busy
Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.
The default value of aria-busy
is false
for all elements. When aria-busy
is true
for an element, assistive technologies MAY ignore changes to content owned by that element and then process all changes made during the busy period as a single, atomic update when aria-busy
becomes false
.
If it is necessary to make multiple additions, modifications, or removals within a container element that is already either partially or fully rendered, authors MAY set aria-busy
to true
on the container element before the first change, and then set it to false
when the last change is complete. For example, if multiple changes to a live region should be spoken as a single unit of speech, authors MAY set aria-busy
to true
while the changes are being made and then set it to false
when the changes are complete and ready to be spoken.
If an element with role feed is marked busy, assistive technologies MAY defer rendering changes that occur inside the feed
with the exception of user-initiated changes that occur inside the article that the user is reading during the busy period.
If changes to a rendered widget would create a state where the widget is missing required owned elements during script execution, authors MUST set aria-busy
to true
on the widget during the update process. For example, if a rendered tree grid required a set of simultaneous updates to multiple discontiguous branches, an alternative to replacing the complete tree element with a single update would be to mark the tree busy while each of the branches are modified.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
All elements of the base markup |
Inherits into Roles: |
Placeholder |
Value: |
true/false |
Values:
Value |
Description |
false (default): |
There are no expected updates for the element. |
true |
The element is being updated. |
aria-checked
Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. See related aria-pressed and aria-selected.
The aria-checked [=attribute=] indicates whether the element is checked (true
), unchecked (false
), or represents a group of other elements that have a mixture of checked and unchecked values (mixed
). Most inputs only support values of true
and false
, but the mixed
value is supported by certain tri-state inputs such as a checkbox or menuitemcheckbox.
The mixed
value is not supported on radio, menuitemradio, switch or any element that inherits from these, and [=user agents=] MUST treat a mixed
value as equivalent to false
for those roles.
Examples using the mixed
value of tri-state inputs are covered in the WAI-ARIA Authoring Practices.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
tristate |
Values:
Value |
Description |
false |
The element supports being checked but is not currently checked. |
mixed |
Indicates a mixed mode value for a tri-state checkbox or menuitemcheckbox. |
true |
The element is checked. |
undefined (default) |
The element does not support being checked. |
aria-colcount
Defines the total number of columns in a table, grid, or treegrid. See related aria-colindex.
If all of the columns are present in the DOM, it is not necessary to set this [=attribute=] as the user agent can automatically calculate the total number of columns. However, if only a portion of the columns is present in the DOM at a given moment, this attribute is needed to provide an explicit indication of the number of columns in the full table.
Authors MUST set the value of aria-colcount to an integer equal to the number of columns in the full table. If the total number of columns is unknown, authors MUST set the value of aria-colcount to -1
to indicate that the value should not be calculated by the user agent.
The following example shows a grid with 16 columns, of which columns 2, 3, 4, and 9 are displayed to the user.
<div role="grid" aria-colcount="16">
<div role="rowgroup">
<div role="row">
<span role="columnheader" aria-colindex="2">First Name</span>
<span role="columnheader" aria-colindex="3">Last Name</span>
<span role="columnheader" aria-colindex="4">Company</span>
<span role="columnheader" aria-colindex="9">Phone</span>
</div>
</div>
<div role="rowgroup">
<div role="row">
<span role="gridcell" aria-colindex="2">Fred</span>
<span role="gridcell" aria-colindex="3">Jackson</span>
<span role="gridcell" aria-colindex="4">Acme, Inc.</span>
<span role="gridcell" aria-colindex="9">555-1234</span>
</div>
<div role="row">
<span role="gridcell" aria-colindex="2">Sara</span>
<span role="gridcell" aria-colindex="3">James</span>
<span role="gridcell" aria-colindex="4">Acme, Inc.</span>
<span role="gridcell" aria-colindex="9">555-1235</span>
</div>
…
</div>
</div>
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
integer |
aria-colindex
Defines an [=element|element's=] column index or position with respect to the total number of columns within a table, grid, or treegrid. See related aria-colindextext, aria-colcount, and aria-colspan.
If all of the columns are present in the DOM, it is not necessary to set this attribute as the user agent can automatically calculate the column index of each cell or gridcell. However, if only a portion of the columns is present in the DOM at a given moment, this attribute is needed to provide an explicit indication of the column of each cell or gridcell with respect to the full table.
Authors MUST set the value for aria-colindex to an integer greater than or equal to 1, greater than the aria-colindex value of any previous elements within the same row, and less than or equal to the number of columns in the full table. For a cell or gridcell which spans multiple columns, authors MUST set the value of aria-colindex to the start of the span.
If the set of columns which is present in the DOM is contiguous, and if there are no cells which span more than one row or column in that set, then authors MAY place aria-colindex on each row, setting the value to the index of the first column of the set. Otherwise, authors SHOULD place aria-colindex on all of the children or [=ARIA/owned=] elements of each row.
The following example shows a grid with 16 columns, of which columns 2 through 5 are displayed to the user. Because the set of columns is contiguous, aria-colindex can be placed on each row.
<div role="grid" aria-colcount="16">
<div role="rowgroup">
<div role="row" aria-colindex="2">
<span role="columnheader">First Name</span>
<span role="columnheader">Last Name</span>
<span role="columnheader">Company</span>
<span role="columnheader">Address</span>
</div>
</div>
<div role="rowgroup">
<div role="row" aria-colindex="2">
<span role="gridcell">Fred</span>
<span role="gridcell">Jackson</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">123 Broad St.</span>
</div>
<div role="row" aria-colindex="2">
<span role="gridcell">Sara</span>
<span role="gridcell">James</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">123 Broad St.</span>
</div>
…
</div>
</div>
The following example shows a grid with 16 columns, of which columns 2 through 5 are displayed to the user. While the set of columns is contiguous, some of the cells span multiple rows. As a result, aria-colindex needs to be placed on all of the owned elements of each row.
<div role="grid" aria-colcount="16">
<div role="rowgroup">
<div role="row">
<span role="columnheader" aria-colindex="2">First Name</span>
<span role="columnheader" aria-colindex="3">Last Name</span>
<span role="columnheader" aria-colindex="4">Company</span>
<span role="columnheader" aria-colindex="5">Address</span>
</div>
</div>
<div role="rowgroup">
<div role="row">
<span role="gridcell" aria-colindex="2">Fred</span>
<span role="gridcell" aria-colindex="3">Jackson</span>
<span role="gridcell" aria-colindex="4" aria-rowspan="2">Acme, Inc.</span>
<span role="gridcell" aria-colindex="5" aria-rowspan="2">123 Broad St.</span>
</div>
<div role="row">
<span role="gridcell" aria-colindex="2">Sara</span>
<span role="gridcell" aria-colindex="3">James</span>
</div>
…
</div>
</div>
The following example shows a grid with 16 columns, of which columns 2, 3, 4, and 9 are displayed to the user. Because the set of columns is non-contiguous, aria-colindex needs to be placed on all of the owned elements of each row.
<div role="grid" aria-colcount="16">
<div role="rowgroup">
<div role="row">
<span role="columnheader" aria-colindex="2">First Name</span>
<span role="columnheader" aria-colindex="3">Last Name</span>
<span role="columnheader" aria-colindex="4">Company</span>
<span role="columnheader" aria-colindex="9">Phone</span>
</div>
</div>
<div role="rowgroup">
<div role="row">
<span role="gridcell" aria-colindex="2">Fred</span>
<span role="gridcell" aria-colindex="3">Jackson</span>
<span role="gridcell" aria-colindex="4">Acme, Inc.</span>
<span role="gridcell" aria-colindex="9">555-1234</span>
</div>
<div role="row">
<span role="gridcell" aria-colindex="2">Sara</span>
<span role="gridcell" aria-colindex="3">James</span>
<span role="gridcell" aria-colindex="4">Acme, Inc.</span>
<span role="gridcell" aria-colindex="9">555-1235</span>
</div>
…
</div>
</div>
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
integer |
aria-colspan
Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. See related aria-colindex and aria-rowspan.
This attribute is intended for cells and gridcells which are not contained in a native table. When defining the column span of cells or gridcells in a native table, authors SHOULD use the host language's attribute instead of aria-colspan. If aria-colspan is used on an element for which the host language provides an equivalent attribute, [=user agents=] MUST ignore the value of aria-colspan and instead expose the value of the host language's attribute to assistive technologies.
Authors MUST set the value of aria-colspan to an integer greater than or equal to 1 and less than the value which would cause the cell or gridcell to overlap the next cell or gridcell in the same row.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
integer |
aria-controls
Identifies the element (or elements) whose contents or presence are controlled by the current element. See related aria-owns.
For example:
- A table of contents tree view may control the content of a neighboring document pane.
- A group of checkboxes may control what commodity prices are tracked live in a table or graph.
- A tab controls the display of its associated tab panel.
Characteristics:
Characteristic |
Value |
Used in Roles: |
All elements of the base markup |
Inherits into Roles: |
Placeholder |
Value: |
ID reference list |
aria-current
Indicates the element that represents the current item within a container or set of related elements.
The aria-current attribute is a token type. Any value not included in the list of allowed values SHOULD be treated by assistive technologies as if the value true
had been provided. If the attribute is not present or its value is an empty string or undefined
, the default value of false
applies and the aria-current state MUST NOT be exposed by user agents or assistive technologies.
The aria-current attribute is used when an element within a set of related elements is visually styled to indicate it is the current item in the set. For example:
- A
page
token used to indicate a page within a set of pages, where the element is visually styled to represent the current page.
- A
step
token used to indicate a step within a step-based process, where the element is visually styled to represent the current step.
- A
location
token used to indicate the element that is visually styled as the current component, such as within a flow chart.
- A
date
token used to indicate the current date within a calendar or other date collection.
- A
time
token used to indicate the current time within a timetable or other time collection.
Authors SHOULD only mark one element in a set of elements as current with aria-current.
Authors SHOULD NOT use the aria-current attribute as a substitute for aria-selected in widgets where aria-selected has the same meaning. For example, in a tablist, aria-selected is used on a tab to indicate the currently-displayed tabpanel.
In some use cases for widgets that support aria-selected, current and selected can have different meanings and can both be used within the same set of elements. For example, aria-current="page"
can be used in a navigation tree to indicate which page is currently displayed, while aria-selected="true"
indicates which page will be displayed if the user activates the treeitem. Furthermore, the same tree may support operating on one or more selected pages (treeitems) by way of a context menu containing options such as "delete" and "move."
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
All elements of the base markup |
Inherits into Roles: |
Placeholder |
Value: |
token |
Values:
Value |
Description |
page |
Represents the current page within a set of pages. |
step |
Represents the current step within a process. |
location |
Represents the current location within an environment or context. |
date |
Represents the current date within a collection of dates. |
time |
Represents the current time within a set of times. |
true |
Represents the current item within a set. |
false (default) |
Does not represent the current item within a set. |
aria-describedby
Identifies the element (or elements) that describes the object. See related aria-labelledby.
The aria-labelledby attribute is similar to aria-describedby in that both reference other elements to calculate a text alternative, but a label should be concise, where a description is intended to provide more verbose information.
The element or elements referenced by the aria-describedby comprise the entire description. Include ID references to multiple elements if necessary, or enclose a set of elements (e.g., paragraphs) with the element referenced by the ID.
Characteristics:
Characteristic |
Value |
Related Concepts: |
<label> in [[HTML]]
- online help
- HTML table cell headers
|
Used in Roles: |
All elements of the base markup |
Inherits into Roles: |
Placeholder |
Value: |
ID reference list |
aria-details
Identifies the element that provides a detailed, extended description for the object. See related aria-describedby.
The aria-details
attribute references a single element that provides more detailed information than would normally be provided by aria-describedby. It enables assistive technologies to make users aware of the availability of an extended description as well as navigate to it. Authors SHOULD ensure the element referenced by aria-details
is visible to all users.
Unlike elements referenced by aria-describedby
, the element referenced by aria-details
is not used in either the Accessible Name Computation or the Accessible Description Computation as defined in the Accessible Name and Description specification. Thus, the content of an element referenced by aria-details
is not flattened to a string when presented to assistive technology users. This makes aria-details
particularly useful when converting the information to a string would cause a loss of information or make the extended description more difficult to understand.
In some user agents, multiple reference relationships for descriptive information are not supported by the accessibility API. In such cases, if both aria-describedby and aria-details
are provided on an element, aria-details
takes precedence.
A common use for aria-details
is in digital publishing where an extended description needs to be conveyed in a book that requires structural markup or the embedding of other technology to provide illustrative content. The following example demonstrates this scenario.
<!-- Provision of an extended description -->
<img src="pythagorean.jpg" alt="Pythagorean Theorem" aria-details="det">
<details id="det">
<summary>Example</summary>
<p>
The Pythagorean Theorem is a relationship in Euclidean Geometry between the three sides of
a right triangle, where the square of the hypotenuse is the sum of the squares of the two
opposing sides.
</p>
<p>
The following drawing illustrates an application of the Pythagorean Theorem when used to
construct a skateboard ramp.
</p>
<object data="skatebd-ramp.svg" type="image/svg+xml"></object>
<p>
In this example you will notice a skateboard with a base and vertical board whose width
is the width of the ramp. To compute how long the ramp must be, simply calculate the
base length, square it, sum it with the square of the height of the ramp, and take the
square root of the sum.
</p>
</details>
Alternatively, aria-details
may refer to a link to a web page having the extended description, as shown in the following example.
<!-- Provision of an extended description -->
<img src="pythagorean.jpg" alt="Pythagorean Theorem" aria-details="det">
<p>
See an <a href="http://foo.com/pt.html" id="det">Application of the Pythagorean Theorem</a>.
</p>
Characteristics:
Characteristic |
Value |
Used in Roles: |
All elements of the base markup |
Value: |
ID reference |
aria-disabled
Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. See related aria-hidden and aria-readonly.
For example, irrelevant options in a radio group may be disabled. Disabled elements might not receive focus from the tab order. For some disabled elements, applications might choose not to support navigation to descendants. In addition to setting the aria-disabled attribute, authors SHOULD change the appearance (grayed out, etc.) to indicate that the item has been disabled.
The state of being disabled applies to the element with aria-disabled and all focusable descendant elements of the element on which the aria-disabled attribute is applied.
While aria-disabled and proper scripting can successfully disable an element with role link, fully disabling a host language equivalent can be problematic. Authors are advised not to use aria-disabled on elements that cannot be disabled through features of the host language alone.
While aria-disabled is currently supported on columnheader, rowheader, and row, in a future version the working group plans to prohibit its use on elements with any of those three roles except when they are in the context of a grid or treegrid.
This state is being deprecated as a global state in ARIA 1.2. In future versions it will only be allowed on roles where it is specifically supported.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Use as a global deprecated in ARIA 1.2 |
Inherits into Roles: |
Placeholder |
Value: |
true/false |
Values:
Value |
Description |
false (default) |
The element is enabled. |
true |
The element and all focusable descendants are disabled and its value cannot be changed by the user. |
aria-dropeffect
[Deprecated in ARIA 1.1] Indicates what functions can be performed when a dragged object is released on the drop target.
The aria-dropeffect
property is expected to be replaced by a new feature in a future version of WAI-ARIA. Authors are therefore advised to treat aria-dropeffect
as deprecated.
This [=ARIA/property=] allows assistive technologies to convey the possible drag options available to users, including whether a pop-up menu of choices is provided by the application. Typically, drop effect functions can only be provided once an object has been grabbed for a drag operation as the drop effect functions available are dependent on the object being dragged.
More than one drop effect may be supported for a given element. Therefore, the value of this attribute is a space-separated set of tokens indicating the possible effects, or none
if there is no supported operation. In addition to setting the aria-dropeffect attribute, authors SHOULD show a visual indication of potential drop targets.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
All elements of the base markup |
Inherits into Roles: |
Placeholder |
Value: |
token list |
Values:
Value |
Description |
copy |
A duplicate of the source object will be dropped into the target. |
execute |
A function supported by the drop target is executed, using the drag source as an input. |
link |
A reference or shortcut to the dragged object will be created in the target object. |
move |
The source object will be removed from its current location and dropped into the target. |
none (default) |
No operation can be performed; effectively cancels the drag operation if an attempt is made to drop on this object. Ignored if combined with any other token value. e.g., 'none copy' is equivalent to a 'copy' value. |
popup |
There is a popup menu or dialog that allows the user to choose one of the drag operations (copy, move, link, execute) and any other drag functionality, such as cancel. |
aria-errormessage
Identifies the element that provides an error message for an object. See related aria-invalid and aria-describedby.
The aria-errormessage
attribute references another element that contains error message text. Authors MUST use aria-invalid in conjunction with aria-errormessage
.
When the value of an object is not valid, aria-invalid is set to true
, which indicates that the message contained by an element referenced by aria-errormessage
is pertinent.
When an object is in a valid state, it has either aria-invalid set to false
or it does not have the aria-invalid attribute. Authors MAY use aria-errormessage
on an object that is currently valid, but only if the element referenced by aria-errormessage
is [=element/hidden=], because the message it contains is not pertinent.
When aria-errormessage
is pertinent, authors MUST ensure the content is not hidden so users can navigate to and examine the error message. Similarly, when aria-errormessage
is not pertinent, authors MUST either ensure the content is [=element/hidden=] or remove the aria-errormessage
attribute or its value.
User agents MUST NOT expose aria-errormessage
for an object with an aria-invalid value of false
.
Authors MAY call attention to a newly rendered error message with a live region by either applying an aria-live property or using one of the live region roles, such as alert. A live region is appropriate when an error message is displayed to users after they have provided an invalid value.
A typical message describes what is wrong and informs users what is required. For example, an error message might be, Invalid time: the time must be between 9:00 AM and 5:00 PM.
The following example code shows markup for an initial valid state and for a subsequent invalid state. Note the changes to aria-invalid on the text input object, and to aria-live on the element containing the text of the error message:
<!-- Initial valid state -->
<label for="startTime"> Please enter a start time for the meeting: </label>
<input id="startTime" type="text" aria-errormessage="msgID" value="" aria-invalid="false">
<span id="msgID" aria-live="assertive"><span style="visibility:hidden">Invalid time: the time must be between 9:00 AM and 5:00 PM</span></span>
<!-- User has input an invalid value -->
<label for="startTime"> Please enter a start time for the meeting: </label>
<input id="startTime" type="text" aria-errormessage="msgID" aria-invalid="true" value="11:30 PM" >
<span id="msgID" aria-live="assertive"><span style="visibility:visible">Invalid time: the time must be between 9:00 AM and 5:00 PM</span></span>
This example uses aria-live="assertive"
to indicate that assistive technologies should immediately announce the error message rather than completing other queued announcements first. This increases the likelihood that users are aware of the error message before they move focus out of the input.
This state is being deprecated as a global state in ARIA 1.2. In future versions it will only be allowed on roles where it is specifically supported.
Characteristics:
Characteristic |
Value |
Used in Roles: |
Use as a global deprecated in ARIA 1.2 |
Inherits into Roles: |
Placeholder |
Value: |
ID reference |
aria-expanded
Indicates whether a grouping element owned or controlled by this element is expanded or collapsed.
The aria-expanded attribute is applied to a focusable, interactive element that toggles visibility of content in another element. For example, it is applied to a parent treeitem to indicate whether its child branch of the tree is shown. Similarly, it can be applied to a button that controls visibility of a section of page content.
If a grouping container that can be expanded or collapsed is not [=ARIA/owned=] by the element that has the aria-expanded attribute, the author SHOULD identify the controlling relationship by referencing the container from the element that has aria-expanded with the aria-controls property.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
true/false/undefined |
Values:
Value |
Description |
false |
The grouping element this element owns or controls is collapsed. |
true |
The grouping element this element owns or controls is expanded. |
undefined (default) |
The element does not own or control a grouping element that is expandable. |
aria-flowto
Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order.
When aria-flowto has a single ID reference, it allows assistive technologies to, at the user's request, forego normal document reading order and go to the targeted object. However, when aria-flowto is provided with multiple ID references, assistive technologies SHOULD present the referenced elements as path choices.
In the case of one or more ID references, [=user agents=] or assistive technologies SHOULD give the user the option of navigating to any of the targeted elements. The name of the path can be determined by the name of the target element of the aria-flowto attribute. Accessibility APIs can provide named path relationships.
Characteristics:
Characteristic |
Value |
Used in Roles: |
All elements of the base markup |
Inherits into Roles: |
Placeholder |
Value: |
ID reference list |
aria-grabbed
[Deprecated in ARIA 1.1] Indicates an element's "grabbed" state in a drag-and-drop operation.
The aria-grabbed
state is expected to be replaced by a new feature in a future version of WAI-ARIA. Authors are therefore advised to treat aria-grabbed
as deprecated.
Setting aria-grabbed
to true
indicates that the element has been selected for dragging. Setting aria-grabbed
to false
indicates that the element can be grabbed for a drag-and-drop operation, but is not currently grabbed. If aria-grabbed
is unspecified or set to undefined
(default), the element cannot be grabbed.
When aria-grabbed is set to true
, authors SHOULD update the aria-dropeffect attribute of all potential drop targets. When an element is not grabbed (the value is set to false
or undefined
, or the attribute is removed), authors SHOULD revert the aria-dropeffect attributes of the associated drop targets to none
.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
All elements of the base markup |
Inherits into Roles: |
Placeholder |
Value: |
true/false/undefined |
Values:
Value |
Description |
false |
Indicates that the element supports being dragged. |
true |
Indicates that the element has been "grabbed" for dragging. |
undefined (default) |
Indicates that the element does not support being dragged. |
aria-hidden
Indicates whether the element is exposed to an accessibility API. See related aria-disabled.
User agents determine an element's [=element/hidden=] status based on whether it is rendered, and the rendering is usually controlled by CSS. For example, an element whose display
property is set to none
is not rendered. An element is considered [=element/hidden=] if it, or any of its ancestors are not rendered or have their aria-hidden
attribute value set to true
.
Authors MAY, with caution, use aria-hidden to hide visibly rendered content from assistive technologies only if the act of hiding this content is intended to improve the experience for users of assistive technologies by removing redundant or extraneous content. Authors using aria-hidden to hide visible content from screen readers MUST ensure that identical or equivalent meaning and functionality is exposed to assistive technologies.
Authors are advised to use extreme caution and consider a wide range of disabilities when hiding visibly rendered content from assistive technologies. For example, a sighted, dexterity-impaired individual may use voice-controlled assistive technologies to access a visual interface. If an author hides visible link text "Go to checkout" and exposes similar, yet non-identical link text "Check out now" to the accessibility API, the user may be unable to access the interface they perceive using voice control. Similar problems may also arise for screen reader users. For example, a sighted telephone support technician may attempt to have the blind screen reader user click the "Go to checkout" link, which they may be unable to find using a type-ahead item search ("Go to…").
At the time of this writing, aria-hidden="false"
is known to work inconsistently in browsers. As future implementations improve, use caution and test thoroughly before relying on this approach.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
All elements of the base markup |
Inherits into Roles: |
Placeholder |
Value: |
true/false/undefined |
Values:
Value |
Description |
false |
The element is exposed to the accessibility API as if it was rendered. |
true |
The element is hidden from the accessibility API. |
undefined (default) |
The element's hidden state is determined by the user agent based on whether it is rendered. |
aria-invalid
Indicates the entered value does not conform to the format expected by the application. See related aria-errormessage.
If the value is computed to be invalid or out-of-range, the application author SHOULD set this attribute to true
. [=user agents=] SHOULD inform the user of the error. Application authors SHOULD provide suggestions for corrections if they are known.
When the user attempts to submit data involving a field for which aria-required is true
, authors MAY use the aria-invalid attribute to signal there is an error. However, if the user has not attempted to submit the form, authors SHOULD NOT set the aria-invalid attribute on required widgets simply because the user has not yet entered data.
For future expansion, the aria-invalid attribute is a token type. Any value not recognized in the list of allowed values MUST be treated by user agents as if the value true
had been provided. If the attribute is not present, or its value is false
, or its value is an empty string, the default value of false
applies.
This state is being deprecated as a global state in ARIA 1.2. In future versions it will only be allowed on roles where it is specifically supported.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Use as a global deprecated in ARIA 1.2 |
Inherits into Roles: |
Placeholder |
Value: |
token |
Values:
Value |
Description |
grammar |
A grammatical error was detected. |
false (default) |
There are no detected errors in the value. |
spelling |
A spelling error was detected. |
true |
The value entered by the user has failed validation. |
aria-keyshortcuts
Defines keyboard shortcuts that an author has implemented to activate or give focus to an element.
The value of the aria-keyshortcuts
attribute is a space-separated list of keyboard shortcuts that can be pressed to activate a command or textbox widget. The keys defined in the shortcuts represent the physical keys pressed and not the actual characters generated. Each keyboard shortcut consists of one or more tokens delimited by the plus sign ("+") representing zero or more modifier keys and exactly one non-modifier key that must be pressed simultaneously to activate the given shortcut.
Authors MUST specify modifier keys exactly according to the UI Events KeyboardEvent key Values spec [[!uievents-key]] - for example, "Alt", "Control", "Shift", "Meta", or "AltGraph". Note that Meta corresponds to the Command key, and Alt to the Option key, on Apple computers.
The valid names for non-modifier keys are any printable character such as "A", "B", "1", "2", "$", "Plus" for a plus sign, "Space" for the spacebar, or the names of any other non-modifier key specified in the UI Events KeyboardEvent key Values spec [[!uievents-key]] - for example, "Enter", "Tab", "ArrowRight", "PageDown", "Escape", or "F1". The use of "Space" for the spacebar is an exception to the UI Events KeyboardEvent key Values spec [[!uievents-key]] as the space or spacebar key is encoded as ' '
and would be treated as a whitespace character.
Authors MUST ensure modifier keys come first when they are part of a keyboard shortcut. Authors MUST ensure that required non-modifier keys come last when they are part of a shortcut. The order of the modifier keys is not otherwise significant, so "Alt+Shift+T" and "Shift+Alt+T" are equivalent, but "T+Shift+Alt" is not valid because all of the modifier keys don't come first, and "Alt" is not valid because it doesn't include at least one non-modifier key.
When specifying an alphabetic key, both the uppercase and lowercase variants are considered equivalent: "a" and "A" are the same.
When implementing keyboard shortcuts authors should consider the keyboards they intend to support to avoid unintended results. Keyboard designs vary significantly based on the device used and the languages supported. For example, many modifier keys are used in conjunction with other keys to create common punctuation symbols, create number characters, swap keyboard sides on bilingual keyboards to switch languages, and perform a number of other functions.
For many supported keyboards, authors can prevent conflicts by avoiding keys other than ASCII letters, as number characters and common punctuation often require modifiers. Here, the keyboard shortcut entered does not equate to the key generated. For example, in French keyboard layouts, the number characters are not available until you press the Control key, so a keyboard shortcut defined as "Control+2" would be ambiguous as this is how one would type the "2" character on a French keyboard.
If the character used is determined by a modifier key, the author MUST specify the actual key used to generate the character, that is generated by the key, and not the resulting character. This convention enables the assistive technology to accurately convey what keys must be used to generate the shortcut. For example, on most U.S. English keyboards, the percent sign "%" can be input by pressing Shift+5. The correct way to specify this shortcut is "Shift+5". It is incorrect to specify "%" or "Shift+%". However, note that on some international keyboards the percent sign may be an unmodified key, in which case "%" and "Shift+%" could be correct on those keyboards.
If the key that needs to be specified is illegal in the host language or would cause a string to be terminated, authors MUST use the string escaping sequence of the host language to specify it. For example, the single-quote character can be encoded as "'" in HTML.
Examples of valid keyboard shortcuts include:
- "A"
- "Shift+Space"
- "Control+Alt+."
- "Control+Shift+'"
- "Alt+Shift+P Control+F"
- "Meta+C Meta+Shift+C"
User agents MUST NOT change keyboard behavior in response to the aria-keyshortcuts
attribute. Authors MUST handle scripted keyboard events to process aria-keyshortcuts
. The aria-keyshortcuts
attribute exposes the existence of these shortcuts so that assistive technologies can communicate this information to users.
Authors SHOULD provide a way to expose keyboard shortcuts so that all users may discover them, such as through the use of a tooltip. Authors MUST ensure that aria-keyshortcuts
applied to disabled elements are unavailable.
Authors SHOULD avoid implementing shortcut keys that inhibit operating system, user agent, or assistive technology functionality. This requires the author to carefully consider both which keys to assign and the contexts and conditions in which the keys are available to the user. For guidance, see the keyboard shortcuts section of the WAI-ARIA Authoring Practices.
Characteristics:
Characteristic |
Value |
Related Concepts: |
Keyboard shortcut |
Used in Roles: |
All elements of the base markup |
Inherits into Roles: |
Placeholder |
Value: |
string |
aria-label
Defines a string value that labels the current element. See related aria-labelledby.
The purpose of aria-label is the same as that of aria-labelledby. It provides the user with a recognizable name of the object. The most common accessibility API mapping for a label is the accessible name property.
If the label text is available in the DOM (i.e. typically visible text content), authors SHOULD use aria-labelledby and SHOULD NOT use aria-label. There may be instances where the name of an element cannot be determined programmatically from the DOM, and there are cases where referencing DOM content is not the desired user experience. Most host languages provide an attribute that could be used to name the element (e.g., the title
attribute in [[HTML]]), yet this could present a browser tooltip. In the cases where DOM content or a tooltip is undesirable, authors MAY set the accessible name of the element using aria-label. As required by the accessible name and description computation, user agents give precedence to aria-labelledby over aria-label when computing the accessible name property.
Characteristics:
Characteristic |
Value |
Related Concepts: |
title attribute in [[HTML]] |
Used in Roles: |
All elements of the base markup except for some roles or elements that prohibit its use |
Inherits into Roles: |
Placeholder |
Value: |
string |
aria-labelledby
Identifies the element (or elements) that labels the current element. See related aria-label and aria-describedby.
The purpose of aria-labelledby is the same as that of aria-label. It provides the user with a recognizable name of the object. The most common accessibility API mapping for a label is the accessible name property.
If the interface is such that it is not possible to have a visible label on the screen, authors SHOULD use aria-label and SHOULD NOT use aria-labelledby. As required by the accessible name and description computation, user agents give precedence to aria-labelledby over aria-label when computing the accessible name property.
The aria-labelledby attribute is similar to aria-describedby in that both reference other elements to calculate a text alternative, but a label should be concise, where a description is intended to provide more verbose information.
The expected spelling of this property in U.S. English is "labeledby." However, the accessibility API features to which this property is mapped have established the "labelledby" spelling. This property is spelled that way to match the convention and minimize the difficulty for developers.
Characteristics:
Characteristic |
Value |
Related Concepts: |
<label> in [[HTML]] |
Used in Roles: |
All elements of the base markup except for some roles or elements that prohibit its use |
Inherits into Roles: |
Placeholder |
Value: |
ID reference list |
aria-level
Defines the hierarchical level of an element within a structure.
This can be applied inside trees to tree items, to headings inside a document, to nested grids, nested tablists and to other structural items that may appear inside a container or participate in an ownership hierarchy. The value for aria-level is an integer greater than or equal to 1.
Levels increase with depth. If the DOM ancestry does not accurately represent the level, authors SHOULD explicitly define the aria-level attribute.
This attribute is applied to elements that act as leaf nodes within the orientation of the set, for example, on elements with role treeitem rather than elements with role group. This means that multiple elements in a set may have the same value for this attribute. Although it would be less repetitive to provide a single value on the container, restricting this to leaf nodes ensures that there is a single way for assistive technologies to use the attribute.
If the DOM ancestry accurately represents the level, the user agent can calculate the level of an item from the document structure. This attribute can be used to provide an explicit indication of the level when that is not possible to calculate from the document structure or the aria-owns attribute. User agent support for automatic calculation of level may vary; authors SHOULD test with [=user agents=] and assistive technologies to determine whether this attribute is needed. If the author intends for the user agent to calculate the level, the author SHOULD omit this attribute.
In the case of a treegrid, aria-level is supported on elements with the role row, not elements with role gridcell. At first glance, this may seem inconsistent with the application of aria-level on treeitem elements, but it is consistent in that the row acts as the leaf node within the vertical orientation of the grid, whereas the gridcell is a leaf node within the horizontal orientation of each row. Level is not supported on sets of cells within rows, so the aria-level attribute is applied to the element with the role row.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
integer |
aria-live
Indicates that an element will be updated, and describes the types of updates the [=user agents=], assistive technologies, and user can expect from the live region.
The values of this attribute are expressed in degrees of importance. When regions are specified as polite
, assistive technologies will notify users of updates but generally do not interrupt the current task, and updates take low priority. When regions are specified as assertive
, assistive technologies will immediately notify the user, and could potentially clear the speech queue of previous updates.
Politeness levels are essentially an ordering mechanism for updates and serve as a strong suggestion to user agents or assistive technologies. The value may be overridden by user agents, assistive technologies, or the user. For example, if assistive technologies can determine that a change occurred in response to a key press or a mouse click, the assistive technologies may present that change immediately even if the value of the aria-live attribute states otherwise.
Since different users have different needs, it is up to the user to tweak his or her assistive technologies' response to a live region with a certain politeness level from the commonly defined baseline. Assistive technologies may choose to implement increasing and decreasing levels of granularity so that the user can exercise control over queues and interruptions.
When the [=ARIA/property=] is not set on an object that needs to send updates, the politeness level is the value of the nearest ancestor that sets the aria-live attribute.
The aria-live attribute is the primary determination for the order of presentation of changes to live regions. Implementations will also consider the default level of politeness in a role when the aria-live attribute is not set in the ancestor chain (e.g., log changes are polite
by default). Items which are assertive
will be presented immediately, followed by polite
items. User agents or assistive technologies MAY choose to clear queued changes when an assertive change occurs. (e.g., changes in an assertive region may remove all currently queued changes)
When live regions are marked as polite
, assistive technologies SHOULD announce updates at the next graceful opportunity, such as at the end of speaking the current sentence or when the user pauses typing. When live regions are marked as assertive
, assistive technologies SHOULD notify the user immediately. Because an interruption may disorient users or cause them to not complete their current task, authors SHOULD NOT use the assertive value unless the interruption is imperative.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
All elements of the base markup |
Inherits into Roles: |
Placeholder |
Value: |
token |
Values:
Value |
Description |
assertive |
Indicates that updates to the region have the highest priority and should be presented the user immediately. |
off (default) |
Indicates that updates to the region should not be presented to the user unless the user is currently focused on that region. |
polite |
Indicates that updates to the region should be presented at the next graceful opportunity, such as at the end of speaking the current sentence or when the user pauses typing. |
aria-modal
Indicates whether an element is modal when displayed.
The aria-modal attribute is used to indicate that the presence of a "modal" element precludes usage of other content on the page. For example, when a modal dialog is displayed, it is expected that the user's interaction is limited to the contents of the dialog, until the modal dialog loses focus or is no longer displayed.
When a modal element is displayed, assistive technologies SHOULD navigate to the element unless focus has explicitly been set elsewhere. Assistive technologies MAY limit navigation to the modal element's contents. If focus moves to an element outside the modal element, assistive technologies SHOULD NOT limit navigation to the modal element.
When a modal element is displayed, authors MUST ensure the interface can be controlled using only descendants of the modal element. In other words, if a modal dialog has a close button, the button should be a descendant of the dialog. When a modal element is displayed, authors SHOULD mark all other contents as inert (such as "inert subtrees" in HTML) if the ability to do so exists in the host language.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
true/false |
Values:
Value |
Description |
false (default) |
Element is not modal. |
true |
Element is modal. |
aria-multiline
Indicates whether a text box accepts multiple lines of input or only a single line.
In most user agent implementations, the default behavior of the ENTER or RETURN key is different between the single-line and multi-line text fields in HTML. When user has focus in a single-line <input type="text">
element, the keystroke usually submits the form. When user has focus in a multi-line <textarea>
element, the keystroke inserts a line break. The WAI-ARIA textbox
role differentiates these types of boxes with the aria-multiline attribute, so authors are advised to be aware of this distinction when designing the field.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
true/false |
Values:
Value |
Description |
false (default) |
This is a single-line text box. |
true |
This is a multi-line text box. |
aria-multiselectable
Indicates that the user may select more than one item from the current selectable descendants.
Authors SHOULD ensure that selected descendants have the aria-selected attribute set to true
, and selectable descendant have the aria-selected attribute set to false
. Authors SHOULD NOT use the aria-selected attribute on descendants that are not selectable.
Lists and trees are examples of roles that might allow users to select more than one item at a time.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
true/false |
Values:
Value |
Description |
false (default) |
Only one item can be selected. |
true |
More than one item in the widget may be selected at a time. |
aria-orientation
Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
In ARIA 1.1, the default value for aria-orientation changed from horizontal
to undefined
. Implicit defaults are defined on some roles (e.g., slider defaults to horizontal; scrollbar defaults to vertical) but remain undefined on roles where an expected default orientation is ambiguous (e.g., radiogroup).
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
token |
Values:
Value |
Description |
horizontal |
The element is oriented horizontally. |
undefined (default) |
The element's orientation is unknown/ambiguous. |
vertical |
The element is oriented vertically. |
aria-owns
Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. See related aria-controls.
The value of the aria-owns attribute is a space-separated ID reference list that references one or more elements in the document by ID. The reason for adding aria-owns is to expose a parent/child contextual relationship to assistive technologies that is otherwise impossible to infer from the DOM.
If an element has both aria-owns and DOM children then the order of the child elements with respect to the parent/child relationship is the DOM children first, then the elements referenced in aria-owns. If the author intends that the DOM children are not first, then list the DOM children in aria-owns in the desired order. Authors SHOULD NOT use aria-owns as a replacement for the DOM hierarchy. If the relationship is represented in the DOM, do not use aria-owns. Authors MUST ensure that an element's ID is not specified in more than one other element's aria-owns attribute at any time. In other words, an element can have only one explicit owner.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
All elements of the base markup |
Inherits into Roles: |
Placeholder |
Value: |
ID reference list |
aria-placeholder
Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format.
Authors SHOULD NOT use aria-placeholder instead of a label as their purposes are different: The label indicates what kind of information is expected. The placeholder text is a hint about the expected value. See related aria-labelledby and aria-label.
Authors SHOULD present this hint to the user by displaying the hint text at any time the control's value is the empty string. This includes cases where the control first receives focus, and when users remove a previously-entered value.
As is the case with the related placeholder
attribute in [[HTML]], use of placeholder text as a replacement for a displayed label can reduce the accessibility and usability of the control for a range of users including older users and users with cognitive, mobility, fine motor skill or vision impairments. While the hint given by the control's label is shown at all times, the short hint given in the placeholder attribute is only shown before the user enters a value. Furthermore, placeholder text may be mistaken for a pre-filled value, and as commonly implemented the default color of the placeholder text provides insufficient contrast and the lack of a separate visible label reduces the size of the hit region available for setting focus on the control.
The following examples do not use the HTML label
element as it cannot be used to label HTML elements with contenteditable
.
The following example shows a searchbox in which the user has entered a value:
<span id="label">Birthday:</span>
<div contenteditable role="searchbox" aria-labelledby="label" aria-placeholder="MM-DD-YYYY">03-14-1879</div>
The following example shows the same searchbox in which the user has not yet entered a value or has removed a previously-entered value:
<span id="label">Birthday:</span>
<div contenteditable role="searchbox" aria-labelledby="label" aria-placeholder="MM-DD-YYYY">MM-DD-YYYY</div>
Characteristics:
Characteristic |
Value |
Related Concepts: |
placeholder attribute in [[HTML]] |
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
string |
aria-posinset
Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related aria-setsize.
If all items in a set are present in the document structure, it is not necessary to set this attribute, as the user agent can automatically calculate the set size and position for each item. However, if only a portion of the set is present in the document structure at a given moment, this [=ARIA/property=] is needed to provide an explicit indication of an element's position.
The following example shows items 5 through 8 in a set of 16.
<h2 id="label_fruit"> Available Fruit </h2>
<ul role="listbox" aria-labelledby="label_fruit">
<li role="option" aria-setsize="16" aria-posinset="5"> apples </li>
<li role="option" aria-setsize="16" aria-posinset="6"> bananas </li>
<li role="option" aria-setsize="16" aria-posinset="7"> cantaloupes </li>
<li role="option" aria-setsize="16" aria-posinset="8"> dates </li>
</ul>
When specifying aria-posinset, authors MUST specify a value that is an integer greater than or equal to 1, and less than or equal to the size of the set when that size is known. If authors specify aria-posinset, authors MUST also specify a value for aria-setsize.
When specifying aria-posinset
on a menuitem, menuitemcheckbox, or menuitemradio, authors SHOULD set the value of aria-posinset
with respect to the total number of items in the menu, excluding any separators.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
integer |
aria-pressed
Indicates the current "pressed" state of toggle buttons. See related aria-checked and aria-selected.
Toggle buttons require a full press-and-release cycle to change their value. Activating it once changes the value to true
, and activating it another time changes the value back to false
. A value of mixed
means that the values of more than one item controlled by the button do not all share the same value. If the attribute is not present, the button is not a toggle button.
The aria-pressed attribute is similar but not identical to the aria-checked attribute. Operating systems support pressed
on buttons and checked
on checkboxes.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
tristate |
Values:
Value |
Description |
false |
The element supports being pressed but is not currently pressed. |
mixed |
Indicates a mixed mode value for a tri-state toggle button. |
true |
The element is pressed. |
undefined (default) |
The element does not support being pressed. |
aria-readonly
Indicates that the element is not editable, but is otherwise operable. See related aria-disabled.
This means the user can read but not set the value of the widget. Readonly elements are relevant to the user, and application authors SHOULD NOT restrict navigation to the element or its focusable descendants. Other actions such as copying the value of the element are also supported. This is in contrast to disabled elements, to which applications might not allow user navigation to descendants.
Examples include:
- A form element which represents a constant.
- Row or column headers in a spreadsheet grid.
- The result of a calculation such as a shopping cart total.
Characteristics:
Characteristic |
Value |
Related Concepts: |
readonly attribute in [[HTML]] |
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
true/false |
Values:
Value |
Description |
false (default) |
The user can set the value of the element. |
true |
The user cannot change the value of the element. |
aria-relevant
Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. See related aria-atomic.
The attribute is represented as a space-separated list of the following values: additions
, removals
, text
; or a single catch-all value all
.
This is used to describe semantically meaningful changes, as opposed to merely presentational ones. For example, nodes that are removed from the top of a log are merely removed for purposes of creating room for other entries, and the removal of them does not have meaning. However, in the case of a buddy list, removal of a buddy name indicates that they are no longer online, and this is a meaningful event. In that case aria-relevant will be set to all
. When the aria-relevant attribute is not provided, the default value, additions text
, indicates that text modifications and node additions are relevant, but that node removals are irrelevant.
aria-relevant values of removals or all are to be used sparingly. Assistive technologies only need to be informed of content removal when its removal represents an important change, such as a buddy leaving a chat room.
Text removals should only be considered relevant if one of the specified values is 'removals' or 'all'. For example, for a text change from 'foo' to 'bar' in a live region with a default aria-relevant value, the text addition ('bar') would be spoken, but the text removal ('foo') would not.
aria-relevant is an optional attribute of live regions. This is a suggestion to assistive technologies, but assistive technologies are not required to present changes of all the relevant types.
When aria-relevant is not defined, an element's value is inherited from the nearest ancestor with a defined value. Although the value is a token list, inherited values are not additive; the value provided on a descendant element completely overrides any inherited value from an ancestor element.
When text changes are denoted as relevant, user agents MUST monitor any descendant node change that affects the accessible name and description computation of the live region as if the accessible name were determined from contents (nameFrom: contents). For example, a text change would be triggered if the HTML alt
attribute of a contained image changed. However, no change would be triggered if there was a text change to a node outside the live region, even if that node was referenced (via aria-labelledby) by an element contained in the live region.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
All elements of the base markup |
Inherits into Roles: |
Placeholder |
Value: |
token list |
Values:
Value |
Description |
additions |
Element nodes are added to the accessibility tree within the live region. |
additions text (default) |
Equivalent to the combination of values, "additions text". |
all |
Equivalent to the combination of all values, "additions removals text". |
removals |
Text content, a text alternative, or an element node within the live region is removed from the accessibility tree. |
text |
Text content or a text alternative is added to any descendant in the accessibility tree of the live region. |
aria-required
Indicates that user input is required on the element before a form may be submitted.
For example, if the user needs to fill in an address field, the author will need to set the field's aria-required attribute to true
.
The fact that the element is required is often presented visually (such as a sign or symbol after the widget). Using the aria-required attribute allows the author to explicitly convey to assistive technologies that an element is required.
Unless an exactly equivalent native attribute is available, host languages SHOULD allow authors to use the aria-required attribute on host language form elements that require input or selection by the user.
Characteristics:
Characteristic |
Value |
Related Concepts: |
required attribute in [[HTML]] |
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
true/false |
Values:
Value |
Description |
false (default) |
User input is not necessary to submit the form. |
true |
Users need to provide input on an element before a form is submitted. |
aria-roledescription
Defines a human-readable, author-localized description for the role of an element.
Some assistive technologies, such as screen readers, present the role of an element as part of the user experience. Such assistive technologies typically localize the name of the role, and they may customize it as well. Users of these assistive technologies depend on the presentation of the role name, such as "region," "button," or "slider," for an understanding of the purpose of the element and, if it is a widget, how to interact with it.
The aria-roledescription
property gives authors the ability to override how assistive technologies localize and express the name of a role. Thus inappropriately using aria-roledescription
may inhibit users' ability to understand or interact with an element. Authors SHOULD limit use of aria-roledescription
to clarifying the purpose of non-interactive container roles like group or region, or to providing a more specific description of a widget.
When using aria-roledescription
, authors SHOULD also ensure that:
- The element to which
aria-roledescription
is applied has a valid WAI-ARIA role or has an implicit WAI-ARIA role semantic.
- The value of
aria-roledescription
is not empty or does not contain only whitespace characters.
Depending on the assistive technology, user verbosity settings, or other factors, certain elements' role descriptions might not be conveyed. If specifying aria-roledescription
on such elements, then the custom role descriptions may also not be conveyed by these assistive technologies.
User agents MUST NOT expose the aria-roledescription
property if any of the following conditions exist:
- The element to which
aria-roledescription
is applied does not have a valid WAI-ARIA role or does not have an implicit WAI-ARIA role semantic.
- The element to which
aria-roledescription
is applied has an explicit or implicit WAI-ARIA role where aria-roledescription
is prohibited.
- The value of
aria-roledescription
is empty or contains only whitespace characters.
Assistive technologies SHOULD use the value of aria-roledescription
when presenting the role of an element, but SHOULD NOT change other functionality based on the role of an element that has a value for aria-roledescription
. For example, an assistive technology that provides functions for navigating to the next region or button SHOULD allow those functions to navigate to regions and buttons that have an aria-roledescription
.
The following two examples show the use of aria-roledescription
to indicate that a non-interactive container is a "slide" in a web-based presentation application.
<div role="region" aria-roledescription="slide" id="slide42" aria-labelledby="slide42heading">
<h1 id="slide42heading">Quarterly Report</h1>
<!-- remaining slide contents -->
</div>
<section aria-roledescription="slide" id="slide42" aria-labelledby="slide42heading">
<h1 id="slide42heading">Quarterly Report</h1>
<!-- remaining slide contents -->
</section>
In the previous examples, a screen reader user may hear "Quarterly Report, slide" rather than the more vague "Quarterly Report, region" or "Quarterly Report, group."
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
All elements of the base markup |
Inherits into Roles: |
Placeholder |
Value: |
string |
aria-rowcount
Defines the total number of rows in a table, grid, or treegrid. See related aria-rowindex.
If all of the rows are present in the DOM, it is not necessary to set this attribute as the user agent can automatically calculate the total number of rows. However, if only a portion of the rows is present in the DOM at a given moment, this attribute is needed to provide an explicit indication of the number of rows in the full table.
Authors MUST set the value of aria-rowcount to an integer equal to the number of rows in the full table. If the total number of rows is unknown, authors MUST set the value of aria-rowcount to -1
to indicate that the value should not be calculated by the user agent.
The following example shows a grid with 2000 rows, of which the first row and rows 100 through 102 are displayed to the user.
<div role="grid" aria-rowcount="2000">
<div role="rowgroup">
<div role="row" aria-rowindex="1">
<span role="columnheader">First Name</span>
<span role="columnheader">Last Name</span>
<span role="columnheader">Company</span>
<span role="columnheader">Phone</span>
</div>
</div>
<div role="rowgroup">
<div role="row" aria-rowindex="100">
<span role="gridcell">Fred</span>
<span role="gridcell">Jackson</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">555-1234</span>
</div>
<div role="row" aria-rowindex="101">
<span role="gridcell">Sara</span>
<span role="gridcell">James</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">555-1235</span>
</div>
<div role="row" aria-rowindex="102">
<span role="gridcell">Taylor</span>
<span role="gridcell">Johnson</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">555-1236</span>
</div>
</div>
</div>
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
integer |
aria-rowindex
Defines an [=element|element's=] row index or position with respect to the total number of rows within a table, grid, or treegrid. See related aria-rowindextext, aria-rowcount, and aria-rowspan.
If all of the rows are present in the DOM, it is not necessary to set this attribute as the user agent can automatically calculate the index of each row. However, if only a portion of the rows is present in the DOM at a given moment, this attribute is needed to provide an explicit indication of each row's position with respect to the full table.
Authors MUST set the value for aria-rowindex to an integer greater than or equal to 1, greater than the aria-rowindex value of any previous rows, and less than or equal to the number of rows in the full table. For a cell or gridcell which spans multiple rows, authors MUST set the value of aria-rowindex to the start of the span.
Authors SHOULD place aria-rowindex on each row. Authors MAY also place aria-rowindex on all of the children or [=ARIA/owned elements=] of each row.
The following example shows a grid with 2000 rows, of which the first row and rows 100 through 102 are displayed to the user.
<div role="grid" aria-rowcount="2000">
<div role="rowgroup">
<div role="row" aria-rowindex="1">
<span role="columnheader">First Name</span>
<span role="columnheader">Last Name</span>
<span role="columnheader">Company</span>
<span role="columnheader">Phone</span>
</div>
</div>
<div role="rowgroup">
<div role="row" aria-rowindex="100">
<span role="gridcell">Fred</span>
<span role="gridcell">Jackson</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">555-1234</span>
</div>
<div role="row" aria-rowindex="101">
<span role="gridcell">Sara</span>
<span role="gridcell">James</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">555-1235</span>
</div>
<div role="row" aria-rowindex="102">
<span role="gridcell">Taylor</span>
<span role="gridcell">Johnson</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">555-1236</span>
</div>
</div>
</div>
The following example shows the grid from the previous example with aria-rowindex also placed on all of the owned elements of each row.
<div role="grid" aria-rowcount="2000">
<div role="rowgroup">
<div role="row" aria-rowindex="1">
<span role="columnheader" aria-rowindex="1">First Name</span>
<span role="columnheader" aria-rowindex="1">Last Name</span>
<span role="columnheader" aria-rowindex="1">Company</span>
<span role="columnheader" aria-rowindex="1">Phone</span>
</div>
</div>
<div role="rowgroup">
<div role="row" aria-rowindex="100">
<span role="gridcell" aria-rowindex="100">Fred</span>
<span role="gridcell" aria-rowindex="100">Jackson</span>
<span role="gridcell" aria-rowindex="100">Acme, Inc.</span>
<span role="gridcell" aria-rowindex="100">555-1234</span>
</div>
<div role="row" aria-rowindex="101">
<span role="gridcell" aria-rowindex="101">Sara</span>
<span role="gridcell" aria-rowindex="101">James</span>
<span role="gridcell" aria-rowindex="101">Acme, Inc.</span>
<span role="gridcell" aria-rowindex="101">555-1235</span>
</div>
<div role="row" aria-rowindex="102">
<span role="gridcell" aria-rowindex="102">Taylor</span>
<span role="gridcell" aria-rowindex="102">Johnson</span>
<span role="gridcell" aria-rowindex="102">Acme, Inc.</span>
<span role="gridcell" aria-rowindex="102">555-1236</span>
</div>
</div>
</div>
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
integer |
aria-rowspan
Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. See related aria-rowindex and aria-colspan.
This attribute is intended for cells and gridcells which are not contained in a native table. When defining the row span of cells or gridcells in a native table, authors SHOULD use the host language's attribute instead of aria-rowspan. If aria-rowspan is used on an element for which the host language provides an equivalent attribute, [=user agents=] MUST ignore the value of aria-rowspan and instead expose the value of the host language's attribute to assistive technologies.
Authors MUST set the value of aria-rowspan to an integer greater than or equal to 0 and less than the value which would cause the cell or gridcell to overlap the next cell or gridcell in the same column. Setting the value to 0 indicates that the cell or gridcell is to span all the remaining rows in the row group.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
integer |
aria-selected
Indicates the current "selected" state of various widgets. See related aria-checked and aria-pressed.
This attribute is used with single-selection and multiple-selection widgets:
- Single-selection containers where the currently focused item is not selected. The selection normally follows the focus, and is managed by the user agent.
- Multiple-selection containers. Authors SHOULD ensure that any selectable descendant of a container in which the aria-multiselectable attribute is
true
specifies a value of either true
or false
for the aria-selected attribute.
Any explicit assignment of aria-selected takes precedence over the implicit selection based on focus. If no DOM element in the widget is explicitly marked as selected, assistive technologies MAY convey implicit selection which follows the keyboard focus of the managed focus widget. If any DOM element in the widget is explicitly marked as selected, the user agent MUST NOT convey implicit selection for the widget.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
true/false/undefined |
Values:
Value |
Description |
false |
The selectable element is not selected. |
true |
The selectable element is selected. |
undefined (default) |
The element is not selectable. |
aria-setsize
Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related aria-posinset.
This [=ARIA/property=] is marked on the members of a set, not the container element that collects the members of the set. To orient the user by saying an element is "item X out of Y," the assistive technologies would use X equal to the aria-posinset attribute and Y equal to the aria-setsize
attribute.
If all items up to the current item in a set are present in the document structure, it is not necessary to set this attribute, as the user agent can automatically calculate the position for these items. However, if all previous items in the set are not present in the document structure at a given moment, the author MUST set this attributeto provide an explicit indication of an element's position.
When specifying aria-setsize
, authors MUST set the value to an integer equal to the number of items in the set. If the total number of items is unknown, authors SHOULD set the value of aria-setsize
to -1
.
When specifying aria-setsize
on a menuitem, menuitemcheckbox, or menuitemradio, authors SHOULD set the value of aria-setsize
based on the total number of items in the menu, excluding any separators.
The following example shows items 5 through 8 in a set of 16.
<h2 id="label_fruit"> Available Fruit </h2>
<ul role="listbox" aria-labelledby="label_fruit">
<li role="option" aria-setsize="16" aria-posinset="5"> apples </li>
<li role="option" aria-setsize="16" aria-posinset="6"> bananas </li>
<li role="option" aria-setsize="16" aria-posinset="7"> cantaloupes </li>
<li role="option" aria-setsize="16" aria-posinset="8"> dates </li>
</ul>
The following example shows items 5 through 8 in a set whose total size is unknown.
<h2 id="label_fruit"> Available Fruit </h2>
<ul role="listbox" aria-labelledby="label_fruit">
<li role="option" aria-setsize="-1" aria-posinset="5"> apples </li>
<li role="option" aria-setsize="-1" aria-posinset="6"> bananas </li>
<li role="option" aria-setsize="-1" aria-posinset="7"> cantaloupes </li>
<li role="option" aria-setsize="-1" aria-posinset="8"> dates </li>
</ul>
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
integer |
aria-sort
Indicates if items in a table or grid are sorted in ascending or descending order.
Authors SHOULD only apply this [=ARIA/property=] to table headers or grid headers. If the property is not provided, there is no defined sort order. For each table or grid, authors SHOULD apply aria-sort to only one header at a time.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
token |
Values:
Value |
Description |
ascending |
Items are sorted in ascending order by this column. |
descending |
Items are sorted in descending order by this column. |
none (default) |
There is no defined sort applied to the column. |
other |
A sort algorithm other than ascending or descending has been applied. |
aria-valuemax
Defines the maximum allowed value for a range widget.
Authors MUST ensure the value of aria-valuemax is greater than or equal to the value of aria-valuemin. If the aria-valuenow has a known maximum and minimum, the author SHOULD provide properties for aria-valuemax and aria-valuemin.
A range widget starts with a given value, which can be increased until reaching the maximum value, defined by this [=ARIA/property=]. Declaring the minimum and maximum values allows assistive technology to convey the size of the range to users.
Characteristics:
Characteristic |
Value |
Related Concepts: |
<input type="range"> element max attribute in [[HTML]] |
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
number |
aria-valuemin
Defines the minimum allowed value for a range widget.
Authors MUST ensure the value of aria-valuemin is less than or equal to the value of aria-valuemax. If the aria-valuenow has a known maximum and minimum, the author SHOULD provide properties for aria-valuemax and aria-valuemin.
A range widget starts with a given value, which can be decreased until reaching the minimum value, defined by this [=ARIA/property=]. Declaring the minimum and maximum values allows assistive technology to convey the size of the range to users.
Characteristics:
Characteristic |
Value |
Related Concepts: |
<input type="range"> element min attribute in [[HTML]] |
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
number |
aria-valuenow
Defines the current value for a range widget. See related aria-valuetext.
This property is used, for example, on a range widget such as a slider or progress bar.
If the current value is not known (for example, an indeterminate progress bar), the author SHOULD NOT set the aria-valuenow attribute. If the aria-valuenow attribute is absent, no information is implied about the current value. If the aria-valuenow has a known maximum and minimum, the author SHOULD provide properties for aria-valuemax and aria-valuemin.
The value of aria-valuenow is a decimal number. If the range is a set of numeric values, then aria-valuenow is one of those values. For example, if the range is [0, 1], a valid aria-valuenow is 0.5. A value outside the range, such as -2.5 or 1.1, is invalid.
For progressbar elements and scrollbar elements, assistive technologies SHOULD render the value to users as a percent, calculated as a position on the range from aria-valuemin to aria-valuemax if both are defined, otherwise the actual value with a percent indicator. For elements with role slider and spinbutton, assistive technologies SHOULD render the actual value to users.
When the rendered value cannot be accurately represented as a number, authors SHOULD use the aria-valuetext attribute in conjunction with aria-valuenow to provide a user-friendly representation of the range's current value. For example, a slider may have rendered values of small
, medium
, and large
. In this case, the values of aria-valuetext would be one of the strings: small
, medium
, or large
.
If aria-valuetext is specified, assistive technologies render that instead of the value of aria-valuenow.
Characteristics:
Characteristic |
Value |
Related Concepts: |
<input type="range"> element value attribute in [[HTML]] |
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
number |
aria-valuetext
Defines the human readable text alternative of aria-valuenow for a range widget.
This property is used, for example, on a range widget such as a slider or progress bar.
If the aria-valuetext attribute is set, authors SHOULD also set the aria-valuenow attribute, unless that value is unknown (for example, on an indeterminate progressbar).
Authors SHOULD only set the aria-valuetext attribute when the rendered value cannot be meaningfully represented as a number. For example, a slider may have rendered values of small
, medium
, and large
. In this case, the values of aria-valuenow could range from 1 through 3, which indicate the position of each value in the value space, but the aria-valuetext would be one of the strings: small
, medium
, or large
. If the aria-valuetext attribute is absent, the assistive technologies will rely solely on the aria-valuenow attribute for the current value.
If aria-valuetext is specified, assistive technologies SHOULD render that value instead of the value of aria-valuenow.
Characteristics:
Characteristic |
Value |
Related Concepts: |
|
Used in Roles: |
Placeholder |
Inherits into Roles: |
Placeholder |
Value: |
string |
Implementation in Host Languages
The roles, state, and [=ARIA/properties=] defined in this specification do not form a complete web language or format. They are intended to be used in the context of a host language. This section discusses how host languages are to implement WAI-ARIA, to ensure that the markup specified here will integrate smoothly and effectively with the host language markup.
Although markup languages look alike superficially, they do not share language definition infrastructure. To accommodate differences in language-building approaches, the requirements are both general and modularization-specific. While allowing for differences in how the specifications are written, the intent is to maintain consistency in how the WAI-ARIA information looks to authors and how it is manipulated in the DOM by scripts.
WAI-ARIA roles, states, and properties are implemented as [=attributes=] of [=elements=]. Roles are applied by placing their names among the tokens appearing in the value of a host-language-provided role
attribute. States and properties each get their own attribute, with values as defined for each particular state or property in this specification. The name of the attribute is the aria-prefixed name of the state or property.
Role Attribute
An implementing host language will provide an attribute with the following characteristics:
- The attribute name MUST be
role
;
- The attribute value MUST allow a token list as the value;
- The appearance of the name literal of any concrete WAI-ARIA role as one of these tokens MUST NOT in and of itself make the attribute value illegal in the host-language syntax; and
- The first name literal of a non-abstract WAI-ARIA role in the list of tokens in the role attribute defines the role according to which the user agent MUST process the element. User Agent processing for roles is defined in the Core Accessibility API Mappings [[CORE-AAM-1.2]].
State and Property Attributes
An implementing host language MUST allow [=attributes=] with the following characteristics:
- The attribute name is the name of any state or property identified in the Supported States and Properties section, such as aria-busy, aria-selected, aria-activedescendant, aria-valuetext;
- The syntax does NOT prevent the attribute from appearing anywhere that it is applicable, as specified in this specification;
- When these attributes appear in a document instance, the attributes will be processed as defined in this specification.
Host languages that support XML Namespaces [[XML-NAMES]] MAY require that WAI-ARIA attributes be used with a namespace. In this case, the namespace for WAI-ARIA state and property attributes MUST be http://www.w3.org/ns/wai-aria/
. To use WAI-ARIA in host languages that do not explicitly describe support for it, authors SHOULD use this namespace as well, if the host language supports namespaces and there is expectation that user agents will recognize the WAI-ARIA namespace. The namespace prefix is not defined by this specification but generally is expected to be "aria
".
The WAI-ARIA state and property attributes have a naming convention such that they all begin with the string "aria-
". This is not a namespace prefix, it is a part of the state or property name. Therefore, when using WAI-ARIA states and properties with namespace prefixes, the complete attribute name will be like "aria:aria-foo
".
Some host languages do not use namespaces with WAI-ARIA state and property attributes, either because the host language does not support namespaces or because the designers wish to incorporate WAI-ARIA into the core feature set. In these host languages, the namespace name for these attributes has no value. The names of these attributes do not have a prefix offset by a colon; in the terms of namespaces they are unprefixed attribute names. The ECMAScript binding of the DOM interface getAttributeNS
for example, treats an empty string (""
) as representing this condition, so that both getAttribute("aria-busy")
and getAttributeNS("", "aria-busy")
access the same aria-busy attribute in the DOM.
According to the requirements of this section, some user agents recognize WAI-ARIA state and property attributes with namespaces, some without namespaces, and some might recognize both. Authors are advised to be aware of which form is supported for the host language they are using. Unless the host language and supporting user agents explicitly indicate that the namespace is required, authors are advised to use the attribute without namespaces. Even user agents that support namespaces generally do not publish namespaced WAI-ARIA states and properties to accessibility APIs. In particular, current implementations of HTML, including XHTML, do not support this namespace.
Focus Navigation
An implementing host language MUST provide support for the author to make all interactive elements focusable, that is, any renderable or event-receiving elements. An implementing host language MUST provide a facility to allow web authors to define whether these focusable, interactive elements appear in the default tab navigation order. The tabindex
attribute in HTML is an example of one implementation.
Implicit WAI-ARIA Semantics
WAI-ARIA is designed to provide semantic information about objects when host languages lack native semantics for the object. WAI-ARIA is designed, however, to provide additional semantics for many host languages. Furthermore, host languages over time can evolve and provide new native features that correspond to WAI-ARIA features. Therefore, there are many situations in which WAI-ARIA semantics are redundant with host language semantics.
These host language features can be viewed as having "implicit WAI-ARIA semantics". User agent processing of features with implicit WAI-ARIA semantics would be similar to the processing for the WAI-ARIA feature. The processing might not be identical because of lexical differences between the host language feature and the WAI-ARIA feature, but generally the user agent would expose the same information to the accessibility API. Features with implicit WAI-ARIA semantics satisfy WAI-ARIA structural requirements such as required owned elements, required states and properties, etc. and do not require explicit WAI-ARIA semantics to be provided. On elements with implicit WAI-ARIA roles, authors can also use WAI-ARIA states and properties supported by those roles without requiring explicit indication of the WAI-ARIA role.
For example, if an element with the functionality already exists, such as a checkbox or radio button, use the native semantics of the host language. WAI-ARIA markup is only intended to be used to enhance the native semantics (e.g., indicating that the element is required with aria-required), or to change the semantics to a different purpose from the standard functionality of the element.
Implicit WAI-ARIA semantics affect the conflict resolution procedures in the following section, Conflicts with Host Language Semantics. Therefore, implicit WAI-ARIA semantics need to be defined in a normative specification, such as the host language specification or the Core Accessibility API Mappings.
Conflicts with Host Language Semantics
WAI-ARIA roles, states, and properties are intended to add semantic information when native host language elements with these semantics are not available, and are generally used on elements that have no native semantics of their own. They can also be used on elements that have similar but non-identical semantics (for example, a nested list could be used to represent a tree structure). This method can be part of a fallback strategy for older browsers that have no WAI-ARIA implementation, or because native presentation of the repurposed element reduces the amount of style and/or script needed. Except for the cases outlined below, user agents MUST always use the WAI-ARIA semantics to define how it exposes the element to accessibility APIs, rather than using the host language semantics.
In addition to these normal situations in which WAI-ARIA is expected to override native semantics, there are elements that are inappropriate to override with WAI-ARIA. This could be because identical host language semantics exist, so WAI-ARIA is not needed, or because semantics from WAI-ARIA directly conflict with host language semantics. When a feature in the host language with identical role semantics and values is available, and the author has no compelling reason to avoid using the host language feature, authors SHOULD use the host language features rather than repurpose other elements with WAI-ARIA.
Host languages can have features that have implicit WAI-ARIA semantics corresponding to roles. When a WAI-ARIA role is provided, user agents MUST use the semantic of the WAI-ARIA role for processing, not the native semantic, unless the role requires WAI-ARIA states and properties whose attributes are explicitly forbidden on the native element by the host language. Values for roles do not conflict in the same way as values for states and properties (for example, the HTML 'checked' attribute and the 'aria-checked' attribute could have conflicting values), and authors are expected to have valid reason to provide a WAI-ARIA role even on elements that would not normally be repurposed.
When WAI-ARIA states and properties correspond to host language features that have the same implicit WAI-ARIA semantic, it can be particularly problematic to use the WAI-ARIA feature. If the WAI-ARIA feature and the host language feature are both provided but their values are not kept in sync, user agents and assistive technologies cannot know which value to use. Therefore, to prevent providing conflicting states and properties to assistive technologies, host languages MUST explicitly declare where the use of WAI-ARIA attributes on each host language element conflicts with native features for that element. When a host language declares a WAI-ARIA attribute to be in direct semantic conflict with a native feature for a given element, user agents MUST ignore the WAI-ARIA attribute and instead use the host language feature with the same implicit semantic.
Host languages MAY document features that cannot be overridden with WAI-ARIA (these are called "strong native semantics"). These can be features that have implicit WAI-ARIA semantics, as well as features where the processing would be uncertain if the semantics were changed with WAI-ARIA. Conformance checkers MAY signal an error or warning when a WAI-ARIA role is used on elements with strong native semantics, but as described above, user agents MUST still use the value of the semantic of the WAI-ARIA role when exposing the element to accessibility APIs unless the native host language semantic is permanently presentational.
The opportunity for host languages to create exceptions to the WAI-ARIA override of native features is meant to avoid potential author errors or problems with intrinsic processing of host language features. Author errors could happen when a host language and WAI-ARIA provide similar but not identical features, where it might not be clear how changing one but not the other affects the accessibility API. Intrinsic processing refers to the way a feature is processed, beyond simple rendering and exposure to the Accessibility API, that cannot reasonably be changed in response to an ARIA feature, and would lead to unpredictable results were ARIA allowed. In these situations, there is good reason for host languages to limit the scope of WAI-ARIA. However, this provision does not give blanket permission for host languages to forbid the use of WAI-ARIA simply by documenting, feature by feature, that it may not be used. Host languages should create restrictions on the use of ARIA only when it is critical to effective processing of content.
Certain ARIA features are critical to building a complete model in the accessibility API. Such features are not expected to conflict with native host language semantics (though they may complement them). Therefore, host languages MUST NOT declare strong native semantics that prevent use of the following ARIA features:
- aria-describedby
- aria-label
- aria-labelledby
State and Property Attribute Processing
State and property attributes are included in host languages, and therefore syntax for representation of their value types is governed by the host language. For each of the value types defined in Value, an appropriate value type from the host language is used. Recommended correspondences between WAI-ARIA value types and various host language value types are listed in Mapping WAI-ARIA Value types to languages. This is a non-normative mapping in order to accommodate new host languages supporting WAI-ARIA.
The list value types—ID reference list and token list—allow more than one value of the given type to be provided. The values are separated by delimiter characters recognized by the host language for list attributes, such as space characters, commas, etc. Some languages may require a specific, single delimiter, while others may allow various delimiters.
Global states and properties are supported on any element in the host language. However, authors MUST only use non-global states and properties on elements with a role supporting the state or property; either defined as an explicit WAI-ARIA role, or as defined by the host language implicit WAI-ARIA semantic matching an appropriate WAI-ARIA role. When a role attribute is added to an element, the semantics and behavior of the element, including support for WAI-ARIA states and properties, are augmented or overridden by the role behavior. User agents MUST ignore non-global states and properties used on an element without a role supporting the state or property; either defined as an explicit WAI-ARIA role, or as defined by the host language WAI-ARIA semantic matching an appropriate WAI-ARIA role. For example, the aria-valuetext attribute may be used on a progressbar.
WAI-ARIA roles have associated states and properties that are qualified as "supported" or "required". An example of a property supported by the combobox role is aria-autocomplete. The property is designated "supported" in this case because a given combobox
might or might not implement auto completion. In contrast, the combobox
role requires the aria-expanded state in order to indicate that it is expandable. Comboboxes have a controlled popup element, such as a listbox
, that is either open or closed. If the listbox
is open, the combobox
is in its expanded state; otherwise it is collapsed.
When WAI-ARIA roles are used, supported states and properties that are not present in the DOM are treated according to their default value. Keeping with the combobox
example, a missing aria-autocomplete
attribute is equivalent to aria-autocomplete="none"
, meaning the combobox
does not offer auto completion.
However, required states and properties that are absent are an author error. Missing required states and properties are processed as detailed at Handling Author Errors.
Elements that have implicit WAI-ARIA semantics support the full set of WAI-ARIA states and properties supported by the corresponding role. Therefore, authors MAY omit the role when setting states and properties. The role is only needed when the implicit WAI-ARIA role of the element needs to be changed.
Sometimes states and properties are present in the DOM but have a zero-length string ("") as their value. Authors MAY specify a zero-length string ("") for any supported (but not required) state or property. User agents SHOULD treat state and property attributes with a value of "" the same as they treat an absent attribute. For supported states and properties, this corresponds to the default value, but if it is a required attribute, it signals an author error and is processed as detailed at Handling Author Errors.
ID Reference Error Processing
[=user agents=] SHOULD ignore ID references that do not match the ID of another element in the same document.
It is the web author's responsibility to ensure that IDs are unique. If more than one element has the same ID, the user agent SHOULD use the first element found with the given ID. The behavior will be the same as getElementById
.
If the same element is specified multiple times in a single WAI-ARIA relation, user agents SHOULD return multiple pointers to the same element.
aria-activedescendant is defined as referencing only a single ID reference. Any aria-activedescendant
value that does not match an existing ID reference exactly is an author error and will not match any element in the DOM.
CSS Selectors
This section might be removed in a future version.
Support for attribute selectors MUST include WAI-ARIA attributes. For example, .fooMenuItem[aria-haspopup="true"] would select all [=elements=] with class fooMenuItem
, and WAI-ARIA property aria-haspopup with value of true
. The presentation MUST be updated for dynamic changes to WAI-ARIA attributes. This allows authors to match styling with WAI-ARIA semantics.
Handling Author Errors
Roles
User agents are expected to perform validation of WAI-ARIA roles.
As stated in the Definition of Roles section, it is considered an authoring error to use abstract roles in content. User agents MUST NOT map abstract roles via the standard role mechanism of the accessibility API.
If the role
attribute contains no tokens matching the name of a non-abstract WAI-ARIA role, the user agent MUST treat the element as if no role had been provided. For example, <table role="foo">
should be exposed in the same way as <table>
and <input type="text" role="structure">
in the same way as <input type="text">
.
States and Properties
In general, [=user agents=] do not do much validation of WAI-ARIA [=ARIA/properties=]. User agents MAY do some minor validation on request and enforce things like aria-posinset being within 1 and aria-setsize, inclusive. User agents are not responsible for logical validation, such as the following:
- Circular references created by relations, such as specifying that two [=elements=] own each other.
- Correct usage with regard to DOM tree structure, such as an element being owned by more than one other element.
- Elements with WAI-ARIA roles correctly implement the behavior of the specified role. For example, user agents do not verify that an element with a role of checkbox actually behaves like a checkbox.
- Elements that do not correctly observe required child / parent role relationships or that appear elsewhere than in their required parent.
- Determining whether aria-activedescendant actually points to an [=ARIA/owned=] element of the container widget.
- Determining implicit values of aria-setsize and aria-posinset when they are specified on some but not all the elements of the set.
If the author specifies a non-numeric value for a decimal or integer value type, the user agent SHOULD do the following:
- When asked for the string version of the property, return the string if specified by the author.
- When asked for the numeric version:
If a WAI-ARIA property contains an unknown or disallowed value, the user agent SHOULD expose to platform accessibility APIs as follows:
- When exposing as a platform accessibility API attribute, expose the unknown value — do not vet it against possible values.
- When exposing as a platform API Boolean state:
- For values of "" (empty string), "undefined" or no [=attribute=] present:
- Treat any other value as true.
- Otherwise, ignore the value and treat the property as not present.
In UIA, the user agent might leave the corresponding property set to "unsupported."
User agents MUST NOT expose WAI-ARIA attributes that reference unresolved IDs. For example:
- When the state or property has only one ID reference that cannot be resolved, treat as if the state or property is not present.
- When the state or property has a list of ID references, ignore any that can't be resolved. If none in the list can be resolved, treat as if the state or property is not present.
User Agents MUST NOT expose aria-roledescription when:
- The element it is applied to has an invalid WAI-ARIA role, or
- The element does not have an implicit WAI-ARIA role
If a required WAI-ARIA attribute for a given role is missing, user agents SHOULD process the attribute as if the values given in the following table were provided.
Fallback values for missing required attributes
WAI-ARIA role |
Required Attribute |
Fallback value |
checkbox |
aria-checked |
false |
combobox |
aria-controls |
no mapping |
combobox |
aria-expanded |
false |
heading |
aria-level |
2 |
menuitemcheckbox |
aria-checked |
false |
menuitemradio |
aria-checked |
false |
radio |
aria-checked |
false |
scrollbar |
aria-controls |
no mapping |
scrollbar |
aria-valuenow |
If missing or not a number,(aria-valuemax - aria-valuemin) / 2 . If present but less than aria-valuemin , the value of aria-valuemin . If present but greater than aria-valuemax , the value of aria-valuemax . |
separator (if focusable) |
aria-valuenow |
If missing or not a number,(aria-valuemax - aria-valuemin) / 2 . If present but less than aria-valuemin , the value of aria-valuemin . If present but greater than aria-valuemax , the value of aria-valuemax . |
slider |
aria-valuenow |
If missing or not a number,(aria-valuemax - aria-valuemin) / 2 . If present but less than aria-valuemin , the value of aria-valuemin . If present but greater than aria-valuemax , the value of aria-valuemax . |
switch |
aria-checked |
false |
meter |
aria-valuenow |
A value matching the implicit or explicitly set aria-valuemin . |
Implicit values for non-required states and properties appear in the characteristics table for each role. These are not considered fallback values so are not included here.
Presentational Roles Conflict Resolution
There are a number of ways presentational role conflicts are resolved.
User agents MUST NOT expose [=elements=] having explicit or inherited presentational role in the accessibility tree, with these exceptions:
- If an element is focusable, or otherwise interactive, user agents MUST ignore the
presentation
role and expose the element with its implicit role, in order to ensure that the element is operable.
- If a required owned element has an explicit non-presentational role, user agents MUST ignore an inherited presentational role and expose the element with its explicit role. If the action of exposing the explicit role causes the accessibility tree to be malformed, the expected results are undefined.
- If an element has global WAI-ARIA states or properties, user agents MUST ignore the
presentation
role and instead expose the element's implicit role. However, if an element has only non-global, role-specific WAI-ARIA states or properties, the element MUST NOT be exposed unless the presentational role is inherited and an explicit non-presentational role is applied.
For example, aria-describedby is a global attribute and would always be applied; aria-level is not a global attribute and would therefore only apply if the element was not in a presentational state.
<h1 role="presentation" aria-describedby="comment-1"> Sample Content </h1>
<h1 role="presentation" aria-level="2"> Sample Content </h1>