Accessibility of web content requires semantic information about widgets, structures, and behaviors, in order to allow assistive technologies to convey appropriate information to persons with
disabilities. This specification provides an ontology of roles, states, and properties that define accessible user interface elements and can be used to improve the accessibility and
interoperability of web content and applications. These semantics are designed to allow an author to properly convey user interface behaviors and structural information to assistive
technologies in document-level markup. This version adds features new since WAI-ARIA 1.1 [wai-aria-1.1] to improve interoperability with assistive technologies to form a more consistent
accessibility model for [HTML] and [SVG2]. This specification complements both [HTML] and [SVG2].
This document is part of the WAI-ARIA suite described in the
WAI-ARIA Overview.
Status of This Document
This section describes the status of this
document at the time of its publication. A list of current W3C
publications and the latest revision of this technical report can be found
in the
W3C standards and drafts index.
Publication as an Editor's Draft does not
imply endorsement by W3C and its Members.
This is a draft document and may be updated, replaced, or obsoleted by other
documents at any time. It is inappropriate to cite this document as other
than a work in progress.
This document was produced by a group
operating under the
W3C Patent
Policy.
W3C maintains a
public list of any patent disclosures
made in connection with the deliverables of
the group; that page also includes
instructions for disclosing a patent. An individual who has actual
knowledge of a patent that the individual believes contains
Essential Claim(s)
must disclose the information in accordance with
section 6 of the W3C Patent Policy.
expanding the accessibility information that can be supplied by the author;
requiring that supporting host languages provide full keyboard support that can be implemented in a device-independent way, for example, by telephones, handheld devices, e-book readers, and
televisions;
improving the accessibility of dynamic content generated by scripts; and
WAI-ARIA is a technical specification that provides a framework to improve the accessibility and interoperability of web content and applications. This document is primarily for developers
creating custom widgets and other web application components. Please see the WAI-ARIA Overview for links to related documents
for other audiences, such as
ARIA Authoring Practices Guide
that introduces developers to the accessibility problems that WAI-ARIA is intended to solve, the fundamental concepts, and the technical approach of WAI-ARIA.
This document currently handles two aspects of roles: user interface functionality and structural relationships. For more information and use cases, see
ARIA Authoring Practices Guide
for the use of roles in making interactive content accessible.
Roles defined by this specification are designed to support the roles used by platform accessibility APIs. Declaration of these roles on elements within dynamic web content is intended to support interoperability between the web content and assistive technologies that utilize
accessibility APIs.
The schema to support this standard has been designed to be extensible so that custom roles can be created by extending base roles. This allows user agents to support at least the base
role, and user agents that support the custom role can provide enhanced access. Note that much of this could be formalized in [XMLSCHEMA11-2]. However, being able to define similarities
between roles, such as baseConcepts and more descriptive definitions, would not be available in XSD.
WAI-ARIA 1.2 is a member of the
WAI-ARIA 1.2 suite that defines how to expose semantics of WAI-ARIA and other web
content languages to accessibility APIs.
1.1 Rich Internet Application Accessibility
The domain of web accessibility defines how to make web content usable by persons with disabilities. Persons with certain types of disabilities use assistive technologies (AT) to interact with content. Assistive technologies can transform the presentation of content into a format more suitable to the user, and can allow the user to interact in different ways.
For example, the user might need to, or choose to, interact with a slider widget via arrow keys, instead of dragging and dropping with a mouse. In order to accomplish this effectively, the
software needs to understand the semantics of the content. Semantics is the science of meaning; in this case, used to assign roles, states, and properties that apply to user interface
and content elements as a human would understand. For instance, if a paragraph is semantically identified as such, assistive technologies can interact with it as a unit separable from the
rest of the content, knowing the exact boundaries of that paragraph. An adjustable range slider or collapsible list (a.k.a. a tree widget) are more complex examples, in which various
parts of the widget have semantics that need to be properly identified for assistive technologies to support effective interaction.
New technologies often overlook semantics required for accessibility, and new authoring practices often misuse the intended semantics of those technologies. Elements that have one
defined meaning in the language are used with a different meaning intended to be understood by the user.
For example, web application developers create collapsible tree widgets in HTML using CSS and JavaScript even though HTML has no semantic tree element. To a non-disabled user,
it might look and act like a collapsible tree widget, but without appropriate semantics, the tree widget might not be perceivable to, or operable by, a person with a disability
because assistive technologies might not recognize the role. Similarly, web application developers create interactive button widgets in SVG using JavaScript even though SVG has no semantic
button element. To a non-disabled user, it might look and act like a button widget, but without appropriate semantics, the button widget might not be perceivable to, or
operable by, a person with a disability because assistive technologies might not recognize the role.
The incorporation of WAI-ARIA is a way for an author to provide proper semantics for custom widgets to make these widgets
accessible, usable, and interoperable with assistive technologies. This specification identifies the types of widgets and structures that are commonly recognized by accessibility products,
by providing an ontology of corresponding roles that can be attached to content. This allows elements with a given role to be understood as a particular widget or structural
type regardless of any semantics inherited from the implementing host language. Roles are a common property of platform
accessibility APIs which assistive technologies use to provide the user with effective presentation and interaction.
The Roles Model includes interaction widgets and elements denoting document structure. The Roles Model describes inheritance and details the attributes each role supports.
Information about mapping of roles to accessibility APIs is provided by the
Core Accessibility API Mappings [CORE-AAM-1.2].
Roles are element types and will not change with time or user actions. Role information is used by assistive technologies, through interaction with the user agent, to provide normal
processing of the specified element type.
States and properties are used to declare important attributes of an element that affect and describe interaction. They enable the user agent and operating system to properly handle
the element even when the attributes are dynamically changed by client-side scripts. For example, alternative input and output technology, such as screen readers and speech dictation
software, need to be able to recognize and effectively manipulate and communicate various interaction states (e.g., disabled, checked) to the user.
Figure 1 illustrates the relationship between user agents (e.g., browsers), accessibility APIs, and assistive technologies. It describes the "contract" provided by
the user agent to assistive technologies, which includes typical accessibility information found in the accessibility API for many of
our accessible platforms for GUIs (role, state, selection, event notification, relationship information, and descriptions). The DOM, usually HTML, acts as the data model and
view in a typical model-view-controller relationship, and JavaScript acts as the controller by manipulating the style and content of the displayed data. The user agent conveys relevant
information to the operating system's accessibility API, which can be used by any assistive technologies, such as screen readers.
Figure 1The contract model with accessibility APIs
Users of alternate input devices need keyboard accessible content. The new semantics, when combined with the recommended keyboard interactions provided in
ARIA Authoring Practices Guide, will allow alternate input solutions to facilitate command and control via an alternate input solution.
WAI-ARIA introduces navigational landmarks through its Roles Model and the
XHTML role landmarks, which can help persons with dexterity and vision impairments by providing for improved keyboard navigation.
WAI-ARIA can also be used to assist persons with cognitive learning disabilities. The additional semantics allow authors to
restructure and substitute alternative content as needed.
Assistive technologies need the ability to support alternative inputs by getting and setting the current value of widget states and properties. Assistive technologies also need
to determine what objects are selected and manage widgets that allow multiple selections, such as list boxes and grids.
Speech-based command and control systems can benefit from WAI-ARIA semantics like the role attribute to assist in
conveying audio information to the user. For example, upon encountering an element with a role of menu with child elements of role menuitem each containing text
content representing a different flavor, a speech system might state to the user, "Select one of three choices: chocolate, strawberry, or vanilla."
WAI-ARIA is intended to be used as a supplement for native language semantics, not a replacement. When the host language provides a
feature that provides equivalent accessibility to the WAI-ARIA feature, use the host language feature.
WAI-ARIA should only be used in cases where the host language lacks the needed role, state, and property
indicators. Use a host language feature that is as similar as possible to the WAI-ARIA feature, then refine the meaning by adding
WAI-ARIA. For instance, a multi-selectable grid could be implemented as a table, and then
WAI-ARIA used to clarify that it is an interactive grid, not just a static data table. This allows for the best possible fallback
for user agents that do not support WAI-ARIA and preserves the integrity of the host language semantics.
1.2 Target Audience
This specification defines the basic model for WAI-ARIA, including roles, states, properties, and values. It impacts several
audiences:
user agents that process content containing WAI-ARIA features;
Authoring tools that help authors create conforming content; and
Conformance checkers that verify appropriate use of WAI-ARIA.
Each conformance requirement indicates the audience to which it applies.
Although this specification is applicable to the above audiences, it is not specifically targeted to, nor is it intended to be the sole source of information for, any of these audiences. The
following documents provide important supporting information:
ARIA Authoring Practices Guide
addresses authoring recommendations for HTML, and is also of interest to developers of authoring tools and conformance checkers.
Assistive technologies use the enhanced information available in an accessibility API, or uses the WAI-ARIA markup
directly via the DOM, to convey semantic and interaction information to the user.
Aside from using WAI-ARIA markup to improve what is exposed to accessibility APIs, user agents behave as they would natively.
Assistive technologies react to the extra information in the accessibility API as they already do for the same information on non-web content. User agents that are not assistive
technologies, however, need do nothing beyond providing appropriate updates to the accessibility API.
The WAI-ARIA specification neither requires nor forbids user agents from enhancing native presentation and interaction behaviors on
the basis of WAI-ARIA markup. Mainstream user agents might expose
WAI-ARIA navigational landmarks (for example, as a dialog box or through a keyboard command) with the intention to facilitate
navigation for all users. User agents are encouraged to maximize their usefulness to users, including users without disabilities.
WAI-ARIA is intended to provide missing semantics so that the intent of the author can be conveyed to assistive technologies.
Generally, authors using WAI-ARIA will provide the appropriate presentation and interaction features. Over time, host languages can
add WAI-ARIA equivalents, such as new form controls, that are implemented as standard accessible user interface controls by the
user agent. This allows authors to use them instead of custom WAI-ARIA enabled user interface components. In this case the user
agent would support the native host language feature. Developers of host languages that implement WAI-ARIA are advised to continue
supporting WAI-ARIA semantics when they do not adversely conflict with implicit host language semantics, as
WAI-ARIA semantics more clearly reflect the intent of the author if the host language features are inadequate to meet the author's
needs.
1.4 Co-Evolution of WAI-ARIA and Host Languages
WAI-ARIA is intended to be used as an accessibility enhancement technology in markup-based host languages. Examples include
[HTML] and [SVG2], which both explicitly support the use of ARIA.
ARIA roles and properties clarify semantics to assistive technologies when authors create new types of objects, via style and script, that are not yet directly supported by the language of
the page, because the invention of new types of objects is faster than standardized support for them appears in web languages.
It is not appropriate to create objects with style and script when the host language provides a semantic element for that type of object. While
WAI-ARIA can improve the accessibility of these objects, accessibility is best provided by allowing the user agent to handle the
object natively. For example, it's better to use an h1 element in HTML than to use the heading role on a div element.
It is expected that, over time, host languages will evolve to provide semantics for objects that currently can only be declared with
WAI-ARIA. This is natural and desirable, as one goal of WAI-ARIA is to
help stimulate the emergence of more semantic and accessible markup. When native semantics for a given feature become available, it is appropriate for authors to use the native feature and
stop using WAI-ARIA for that feature. Legacy content can continue to use
WAI-ARIA, however, so the need for user agents to support
WAI-ARIA remains.
While specific features of WAI-ARIA might lose importance over time, the general possibility of
WAI-ARIA to add semantics to web pages is expected to be a persistent need. Host languages might not implement all the semantics
WAI-ARIA provides, and various host languages can implement different subsets of the features. New types of objects are continually
being developed, and one goal of WAI-ARIA is to provide a way to make such objects accessible, because authoring practices often
advance faster than host language standards. In this way, WAI-ARIA and host languages both evolve together but at different rates.
Some host languages exist to create semantics for features other than the user interface. For example, SVG expresses the semantics behind production of graphical objects, not of user
interface components that those objects can represent. Host languages might, by design, not provide native semantics that map to
WAI-ARIA features. In these cases, WAI-ARIA could be adopted as a
long-term approach to add semantic information to user interface components.
1.5 Authoring Practices
1.5.1 Authoring Tools
Many of the requirements in the definitions of WAI-ARIA roles, states, and properties can be checked
automatically during the development process, similar to other quality control processes used for validating code. To assist authors who are creating custom widgets, authoring tools can
compare widget roles, states, and properties to those supported in WAI-ARIA as well as those supported in related and
cross-referenced roles, states, and properties. Authoring tools can notify authors of errors in widget design patterns, and can also prompt developers for information that cannot be
determined from context alone. For example, a scripting library can determine the labels for the tree items in a tree view, but would need to prompt the author to label the entire tree. To
help authors visualize a logical accessibility structure, an authoring environment might provide an outline view of a web resource based on the
WAI-ARIA markup.
In both HTML and SVG, tabindex is an important way browsers support keyboard focus navigation for implementations of
WAI-ARIA; authoring and debugging tools can check to make sure tabindex values are properly set. For example, error
conditions can include cases where more than one treeitem in a tree has a tabindex value greater than or equal to 0, where tabindex is not set on any treeitem, or
where aria-activedescendant is not defined when the element with the role tree has a tabindex value of greater than or equal to 0.
1.5.2 Testing Practices and Tools
The accessibility of interactive content cannot be confirmed by static checks alone. Developers of interactive content should test for device-independent access to widgets and
applications, and should verify accessibility API access to all content and changes during user interaction.
1.6 Assistive Technologies
Programmatic access to accessibility semantics is essential for assistive technologies. Most assistive technologies interact with user agents, like other applications, through a recognized
accessibility API. Perceivable objects in the user interface are exposed to assistive technologies as accessible objects, defined by the accessibility API interfaces. To do this properly,
accessibility information – role, states, properties as well as contextual information – needs to be accurately conveyed to the assistive technologies through the accessibility API. When a
state change occurs, the user agent provides the appropriate event notification to the accessibility API. Contextual information, in many host languages like HTML, can be determined from the
DOM itself as it provides a contextual tree hierarchy.
While some assistive technologies interact with these accessibility APIs, others might access the content directly from the DOM. These technologies
can restructure, simplify, style, or reflow the content to help a different set of users. Common use cases for these types of adaptations might be the aging population, persons with
cognitive impairments, or persons in environments that interfere with use of their tools. For example, the availability of regional navigational landmarks can allow for a mobile device
adaptation that shows only portions of the content at any one time based on its semantics. This could reduce the amount of information the user needs to process at any one time. In other
situations it might be appropriate to replace a custom user interface control with something that is easier to navigate with a keyboard, or touch screen device.
2. Important Terms
This section is non-normative.
While some terms are defined in place, the following definitions are used throughout this document.
relies on services provided by a user agent to retrieve and render Web content
works with a user agent or web content itself through the use of APIs, and
provides services beyond those offered by the user agent to facilitate user interaction with web content by people with disabilities
This definition might differ from that used in other documents.
Examples of assistive technologies that are important in the context of this document include the following:
screen magnifiers, which are used to enlarge and improve the visual readability of rendered text and images;
screen readers, which are most-often used to convey information through synthesized speech or a refreshable Braille display;
text-to-speech software, which is used to convert text into synthetic speech;
speech recognition software, which is used to allow spoken control and dictation;
alternate input technologies (including head pointers, on-screen keyboards, single switches, and sip/puff devices), which are used to simulate the keyboard;
alternate pointing devices, which are used to simulate mouse pointing and clicking.
Deprecated
A deprecated role, state, or property is one which has been
outdated by newer constructs or changed circumstances, and which might be removed in future versions of the
WAI-ARIA specification. user agents are encouraged to continue to support items identified as deprecated for backward
compatibility. For more information, see Deprecated Requirements in the Conformance section.
Defines
Used in an attribute description to denote that the value type is an integer,
number, or string.
Event from/to the host operating system via the accessibility API, notifying of a change of input focus.
Event
A programmatic message used to communicate discrete changes in the state of an object to other objects in a computational system. User input to a web page is commonly
mediated through abstract events that describe the interaction and can provide notice of changes to the state of a document object. In some programming languages, events are more
commonly known as notifications.
An element or area matching the definition of focusable area in the HTML Specification.
Graphical Document
A document containing graphic representations with user-navigable parts. Charts, maps, diagrams, blueprints, and dashboards are examples of graphical documents. A graphical document is
composed using any combination of symbols, images, text, and graphic primitives (shapes such as circles, points, lines, paths, rectangles, etc).
Hidden
Indicates that the element is excluded from the accessibility tree and therefore not exposed to accessibility APIs.
Used in an attribute description to denote that the value type is an ID reference (identifying a single element) or
ID reference list (identifying one or more elements).
A type of region on a page to which the user might want quick access. Content in such a region is different from that of other regions on the page and relevant to a specific user
purpose, such as navigating, searching, perusing the primary content, etc.
Live Region
Live regions are perceivable regions of a web page that are typically updated as a result of an external event. These regions are not always updated as a result of a user interaction and
can receive these updates even when they do not have focus. Examples of live regions include a chat log, stock ticker, or a sport scoring section that updates periodically to reflect
game statistics. Since these asynchronous areas are expected to update outside the user's area of focus, assistive technologies such as screen readers have either been unaware of their
existence or unable to process them for the user. WAI-ARIA has provided a collection of properties that allow the author to identify these live regions and process them: aria-live,
aria-relevant, aria-atomic, and aria-busy.
Managed State
Accessibility APIstate that is controlled by the user agent, such as focus and selection. These are contrasted with "unmanaged states" that are typically
controlled by the author. Nevertheless, authors can override some managed states, such as aria-posinset and aria-setsize. Many managed states have corresponding CSS pseudo-classes, such
as :focus, and pseudo-elements, such as ::selection, that are also updated by the user agent.
Nemeth Braille
The Nemeth Braille Code for Mathematics is a braille code for encoding mathematical and scientific notation. See
Nemeth Braille on Wikipedia.
Object
In the context of user interfaces, an item in the perceptual user experience, represented in markup languages by one or more elements, and rendered by user agents.
In the context of programming, the instantiation of one or more classes and interfaces which define the general characteristics of similar objects. An object in an
accessibility API can represent one or more DOM objects. Accessibility APIs have defined interfaces
that are distinct from DOM interfaces.
Ontology
A description of the characteristics of classes and how they relate to each other.
attributes that are essential to the nature of a given object, or that represent a data value associated with the object. A change of a property can significantly impact the
meaning or presentation of an object. Certain properties (for example, aria-multiline) are less likely to change than states, but
note that the frequency of change difference is not a rule. A few properties, such as aria-activedescendant, aria-valuenow, and aria-valuetext are
expected to change often. See clarification of states versus properties.
Relationship
A connection between two distinct things. Relationships can be of various types to indicate which object labels another, controls another, etc.
Role
Main indicator of type.
This semantic association allows tools to present and support interaction with the object in a manner that is consistent with user expectations
about other objects of that type.
Semantics
The meaning of something as understood by a human, defined in a way that computers can process a representation of an object, such as elements and attributes, and reliably
represent the object in a way that various humans will achieve a mutually consistent understanding of the object.
State
A state is a dynamic property expressing characteristics of an object that can change in response to user action or automated
processes. States do not affect the essential nature of the object, but represent data associated with the object or user interaction possibilities. See
clarification of states versus properties.
Target Element
An element specified in a WAI-ARIA relation. For example, in <div aria-controls=”elem1”>, where
“elem1” is the ID for the target element.
Unicode Braille Patterns
In Unicode, braille is represented in a block called Braille Patterns (U+2800..U+28FF). The block contains all 256 possible patterns of an 8-dot braille cell; this includes the complete
6-dot cell range which is represented by U+2800..U+283F. In all braille systems, the braille pattern dots-0 (U+2800) is used to represent a space or the lack of content; it is also
called a blank Braille pattern. See Braille Patterns on Wikipedia.
Widget
Discrete user interface object with which the user can interact. Widgets range from simple objects that have one value or operation (e.g., check
boxes and menu items), to complex objects that contain many managed sub-objects (e.g., trees and grids).
3. Conformance
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words MAY, MUST, MUST NOT, SHOULD, and SHOULD NOT in this document
are to be interpreted as described in
BCP 14
[RFC2119] [RFC8174]
when, and only when, they appear in all
capitals, as shown here.
The main content of this specification is "normative" and defines requirements that impact conformance claims. Introductory material, appendices, sections marked as "non-normative" and their
subsections, diagrams, examples, and notes are "informative" (non-normative). Non-normative material provides advisory information to help interpret the guidelines but does not create
requirements that impact a conformance claim.
Normative sections provide requirements that authors, user agents and assistive technologies MUST follow for an implementation to conform to this specification.
Non-normative (informative) sections provide information useful to understanding the specification. Such sections may contain examples of recommended practice, but it is not required to follow
such recommendations in order to conform to this specification.
3.1 Non-interference with the Host Language
WAI-ARIA processing by the user agentMUST NOT interfere with the normal operation of the built-in features of the host
language.
If a CSS selector includes a WAI-ARIA attribute (e.g., input[aria-invalid="true"]), user agents MUST update the visual display of any elements matching (or
no longer matching) the selector any time the attribute is added/changed/removed in the DOM. The user agent MAY alter the mapping of the host
language features into an accessibility API, but the user agent MUST NOT alter the DOM in order to remap WAI-ARIA markup into host
language features.
3.2 All WAI-ARIA in DOM
A conforming user agent which implements a document object model that does not conform to the W3C DOM specification MUST include the content attribute for role and its
WAI-ARIA role values, as well as the WAI-ARIA States and Properties in the DOM as specified by the author, even
though processing might affect how the elements are exposed to accessibility APIs. Doing so ensures that each role attribute and all
WAI-ARIA states and properties, including their values, are in the document in an unmodified form so other tools, such as assistive
technologies, can access them. A conforming W3C DOM meets this criterion.
3.3 Assistive Technology Notifications Communicated to Web Applications
Assistive technologies, such as speech recognition systems and alternate input devices for users with mobility impairments, require the ability to control a web application in a
device-independent way. WAI-ARIA states and properties reflect the current state of rich internet application
components. The ability for assistive technologies to notify web applications of necessary changes is essential because it allows these alternative input solutions to control an application
without being dependent on the standard input device which the user is unable to effectively control directly.
User agents MUST provide a method to notify the web application when a change occurs to states or properties in the system accessibility API. Likewise, authors SHOULD update the web
application accordingly when notified of a change request from the user agent or assistive technology.
3.4 Conformance Checkers
Any application or script verifying document conformance or validity SHOULD include a test for all of the normative author requirements in this specification. If testing for a given
requirement, conformance checkers MUST issue an error if an author "MUST" requirement isn't met, and MUST issue a warning if an author "SHOULD" requirement isn't met.
3.5 Deprecated Requirements
As the technology evolves, sometimes new ways to meet a use case become available, that work better than a feature that was previously defined. But because of existing implementation of the
older feature, that feature cannot be removed from the conformance model without rendering formerly conforming content non-conforming. In this case, the older feature is marked as
"deprecated". This indicates that the feature is allowed in the conformance model and expected to be supported by user agents, but it is recommended that authors do not use it for new
content. In future versions of the specification, if the feature is no longer widely used, the feature could be removed and no longer expected to be supported by user agents.
4. Using WAI-ARIA
Complex web applications become inaccessible when assistive technologies cannot determine the semantics behind portions of a document or when the user is unable to effectively
navigate to all parts of it in a usable way (see
ARIA Authoring Practices Guide). WAI-ARIA divides the semantics into roles (the type defining a user interface element) and states and
properties supported by the roles.
Authors need to associate elements in the document to a WAI-ARIA role and the appropriate states and properties (aria-* attributes) during its life-cycle, unless the elements already
have the appropriate implicit WAI-ARIA semantics for states and properties. In these instances the equivalent host language states and properties take
precedence to avoid a conflict while the role attribute will take precedence over the implicit role of the host language element.
Attaching a role gives assistive technologies information about how to handle each element. When WAI-ARIA roles override host
language semantics, there are no changes in the DOM, only in the accessibility tree.
WAI-ARIA provides a collection of accessibility states and properties which are used to support platform
accessibility APIs on various operating system platforms. Assistive technologies can access this information through an
exposed user agent DOM or through a mapping to the platform accessibility API. When combined with roles, the user agent
can supply the assistive technologies with user interface information to convey to the user at any time. Changes in states or properties will result in a notification to assistive
technologies, which could alert the user that a change has occurred.
In the following example, a list item (html:li) has been used to create a checkable menu item, and JavaScript events will capture mouse and keyboard events to toggle the
value of aria-checked. A role is used to make the behavior of this simple widget known to the user agent. Attributes that change with user actions (such as
aria-checked) are defined in the states and properties section.
<lirole="menuitemcheckbox"aria-checked="true">Sort by Last Modified</li>
Some accessibility states, called managed states, are controlled by the user agent. Examples of managed state include keyboard focus and selection. Managed states often have corresponding
CSS pseudo-classes (such as :focus and ::selection) to define style changes. In contrast, the states in this
specification are typically controlled by the author and are called unmanaged states. Some states are managed by the user agent, such as aria-posinset and
aria-setsize, but the author can override them if the DOM is incomplete and would cause the user agent calculation to be incorrect.
User agents map both managed and unmanaged states to the platform accessibility APIs.
Most modern user agents support
CSS attribute selectors
([CSS3-SELECTORS]), and can allow the author to create UI changes based on WAI-ARIA attribute
information, reducing the amount of scripts necessary to achieve equivalent functionality. In the following example, a CSS selector is used to
determine whether or not the text is bold and an image of a check mark is shown, based on the value of the aria-checked attribute.
If CSS is not used to toggle the visual representation of the check mark, the author could include additional markup and scripts to manage an image that represents whether or not the
menuitemcheckbox is checked.
<lirole="menuitemcheckbox"aria-checked="true"><imgsrc="checked.gif"alt=""><!-- note: additional scripts required to toggle image source -->
Sort by Last Modified
</li>
4.3 Managing Focus and Supporting Keyboard Navigation
When using standard HTML interactive elements and simple WAI-ARIA widgets,
application developers can manipulate the tab order or associate keyboard shortcuts with elements in the document.
WAI-ARIA includes a number of "managing container" widgets, also known as "composite" widgets. When
appropriate, the container is responsible for tracking the last descendant that was active (the default is usually the first item in the container). It is essential that a container maintain
a usable and consistent strategy when focus leaves a container and is then later refocused. While there can be exceptions, it is recommended that when a previously focused container is
refocused, the active descendant be the same element as the active descendant when the container was last focused. Exceptions include cases where the contents of a container widget have
changed, and widgets like a menubar where the user expects to always return to the first item when focus leaves the menu bar. For example, if the second item of a tree group was the active
descendant when the user tabbed out of the tree group, then the second item of the tree group remains the active descendant when the tree group gets focus again. The user can also activate
the container by clicking on one of the descendants within it. When the container or its active descendant has focus, the user can navigate through the container by pressing additional keys,
such as the arrow keys, to change the currently active descendant. Any additional press of the main navigation key (generally the TAB key) will move out of the container to the
next widget.
Usable keyboard navigation in a rich internet application is different from the tabbing paradigm among interactive elements, such as links and form controls, in a static document. In rich
internet applications, the user tabs to significantly complex widgets, such as a menu or spreadsheet, and uses the arrow keys to navigate within the widget. The
changes that WAI-ARIA introduces to keyboard navigation make this enhanced accessibility possible. In
WAI-ARIA, any element can be keyboard focusable. In addition to host language mechanisms such as tabindex,
aria-activedescendant provides another mechanism for keyboard operation. Most other aspects of WAI-ARIA widget
development depend on keyboard navigation functioning properly.
When implementing aria-activedescendant as described below, the user agent keeps the DOM focus on the container element or on an input
element that controls the container element. However, the user agent communicates desktop focus events and states to the assistive technology as if the element referenced by
aria-activedescendant has focus. User agents are not expected to validate that the active descendant is a descendant of the container element. It is the responsibility of the
user agent to ensure that keyboard events are processed at the element that has DOM focus. Any keyboard events directed at the active
descendant bubble up to the DOM element with focus for processing.
4.3.1 Information for Authors
If the author removes the element with focus, the author SHOULD move focus to a logical element. Similarly, authors SHOULD not scroll the element with focus off screen unless the user
performed a scrolling action.
Authors SHOULD ensure that all interactive elements are focusable and that all parts of composite widgets are either focusable or have a documented alternative method to achieve
their function.
Authors MUST manage focus on the following container roles:
User agents that support WAI-ARIA expand the usage of host language mechanisms such as tabindex, focus,
and blur to allow them on all elements. Where the host language supports it, authors MAY add any element such as a div, span, or
img to the default tab order by setting tabindex="0". In addition, any item with tabindex equal to a negative integer is focusable via
script or a mouse click, but is not part of the default tab order. This is supported in both [HTML] and [SVG2].
Authors MAY use aria-activedescendant to inform assistive technologies which descendant of a widget element is treated as having keyboard focus in the user
interface if the role of the widget element supports aria-activedescendant. This is often a more convenient way of providing keyboard navigation within widgets, such as a
listbox, where the widget occupies only one stop in the page Tab sequence and other keys, typically arrow keys, are used to focus elements inside the widget.
Typically, the author will use host language semantics to put the widget in the Tab sequence (e.g., tabindex="0" in HTML) and
aria-activedescendant to point to the ID of the currently active descendant. The author, not the user agent, is responsible for styling the currently active descendant to show
it has keyboard focus. The author cannot use :focus to style the currently active descendant since the actual focus is on the container.
More information on managing focus can be found in the Developing a Keyboard Interface section of the
WAI-ARIA Authoring Practices.
Implement the host language method for keyboard navigation so that widgets that support aria-activedescendant can be included in the tab order.
For platforms that expose desktop focus or accessibility API focus separately from
DOM focus, do not expose the focused state in the accessibility API for any element when
it has DOM focus and also has aria-activedescendant which points to a valid ID reference.
When the aria-activedescendant attribute changes on an element that currently has DOM focus, remove the focused state from the
previously focused object and fire an accessibility API desktop focus event on the new element referenced by
aria-activedescendant. If aria-activedescendant is cleared or does not point to an element in the current document, fire a desktop focus event for the
object that had the attribute change.
Focusable, if the element also has a WAI-ARIA role. The element needs to be focusable because
it could be referenced by the aria-activedescendant attribute. Native elements that have no role attribute do not need to be checked; their native
semantics determine the focusable state.
When an assistive technology uses its platform's accessibility API to request a change of focus, user agents MUST do the following:
Remove the platform's focused state from the previously focused object.
Set the DOM focus:
If the element can take DOM focus, the user agentMUST set the
DOM focus to it.
Otherwise, if the element being focused has an ID and the ID is referenced by the aria-activedescendant attribute of an element that is focusable, the user agent MUST
set DOM focus to the element that has the aria-activedescendant attribute.
The inability to set DOM focus to the containing element indicates an author error.
Otherwise, the user agent MAY attempt to set DOM focus to the child element itself.
If the element being focused has an ID and is an accessibility descendant of either a container element with both an aria-activedescendant attribute and has
DOM focus, or by a container element that is controlled by an element with both an aria-activedescendant attribute and has
DOM focus, the user agent MUST set the accessibility API focused state and fire an
accessibility API focus event on the element identified by the value of aria-activedescendant.
5. The Roles Model
This section defines WAI-ARIA roles and describes their characteristics and properties.
The roles, their characteristics, the states and properties they support, and specification of how they can be used in markup, shall be considered normative.
In order to reflect the content in the DOM, user agents SHOULD map the role attribute to the appropriate value in the implemented accessibility API, and user agents SHOULD update the mapping
when the role attribute changes.
5.1 Relationships Between Concepts
The Roles Model uses the following relationships to relate WAI-ARIA roles to each other and to concepts from other specifications,
such as HTML.
5.1.1 Superclass Role
The role that the current subclassed role extends in the Roles Model. This extension causes all the states and properties of the superclass role to propagate to the subclass role.
Other than well known stable specifications, inheritance can be restricted to items defined inside this specification, so that external items cannot be changed and affect inherited
classes.
5.1.2 Subclass Roles
Informative list of roles for which this role is the superclass. This is provided to facilitate reading of the specification but adds no new information.
5.1.3 Related Concepts
Informative data about a similar or related idea from other specifications. Concepts that are related are not necessarily identical. Related concepts do not inherit properties from each
other. Hence if the definition of one concept changes, the properties, behavior, and definition of its related concept is not affected.
For example, a progress bar is like a status indicator. Therefore, the progressbarwidget has a related concept which includes status. However, if the
definition of status is modified, the definition of a progressbar is not affected.
5.1.4 Base Concept
Informative data about objects that are considered prototypes for the role. Base concept is similar to type, but without inheritance of limitations and properties. Base
concepts are designed as a substitute for inheritance for external concepts. A base concept is like a related concept except that the base concept is almost
identical to the role definition.
For example, the checkbox defined in this document has similar functionality and anticipated behavior to a <input type="checkbox"> defined in
HTML. Therefore, a checkbox has an [HTML] checkbox as a baseConcept. However, if the original [HTML] checkbox baseConcept definition is modified,
the definition of a checkbox in this document will not be affected, because there is no actual inheritance of the respective type.
5.2 Characteristics of Roles
Roles are defined and described by their characteristics. Characteristics define the structural function of a role, such as what a role is, concepts behind it, and what instances the role
can or must contain. In the case of widgets this also includes how it interacts with the user agent based on mapping to HTML forms. States and properties from
WAI-ARIA that are supported by the role are also indicated.
Roles define the following characteristics.
5.2.1 Abstract Roles
Abstract roles are the foundation upon which all other WAI-ARIA roles are built. Authors MUST NOT use abstract roles
because they are not implemented in the API binding. User agents MUST NOT map abstract roles to the standard role mechanism of the
accessibility API. Abstract roles are provided to help with the following:
Organize the Roles Model and provide roles with a meaning in the context of known concepts.
Streamline the addition of roles that include necessary features.
5.2.2 Required States and Properties
States and properties specifically required for the role and subclass roles. Authors MUST provide a non-empty value for required states and properties.
Authors MUST NOT use the value undefined for required states and properties, unless undefined is an explicitly-supported value of that state or property.
When an object inherits from multiple ancestors and one ancestor indicates that property is supported while another ancestor indicates that it is required, the property is required
in the inheriting object.
States and properties specifically applicable to the role and child roles. Authors MAY provide values for supported states and properties, but need not
in cases where default values are sufficient. user agentsMUST map all supported states and properties for the role to an accessibility API. If the state or property is undefined and
it has a default value for the role, user agentsSHOULD expose the default value.
Informative list of properties that are inherited by a role from superclass roles. States and properties are inherited from superclass roles in the Roles Model, not
from ancestor elements in the DOM tree. These properties are not explicitly defined on the role, as the inheritance of properties is
automatic. This information is provided to facilitate reading of the specification. The set of supported states and properties combined with inherited states and properties forms the full
set of states and properties supported by the role.
5.2.5 Prohibited States and Properties
List of states and properties that are prohibited on a role. Authors MUST NOT specify a prohibited state or property.
Note
A host language attribute with the appropriate implicit WAI-ARIA semantic would also prohibit a state or property in this section.
5.2.6 Allowed Accessibility Child Roles
A list of roles which are allowed on an accessibility child (simplified as "child") of the element with this role. Authors MUST only add child element with allowed roles. For
example, an element with the role list can own child elements with the role listitem, but cannot own elements with the role option.
To determine whether an element is the child of an element, user agentsMUST ignore any intervening elements with the role generic or none.
Descendants which are not children of an element ancestor are not constrained by allowed accessibility child roles. For example, an image is not an allowed child of a
list, but it is a valid descendant if it is also a descendant of the list's allowed child listitem.
Note
A role that has 'allowed accessibility child roles' does not imply the reverse relationship. Elements with roles in this list do not always have to be found within elements of the given
role. See required accessibility parent roles for requirements about the context where elements of a given role will be contained.
Note
An element with a subclass role of the 'allowed accessibility child role' does not fulfill this requirement. For example, the listbox role allows
a child element using the option or group role. Although the group role is the superclass of row, adding a child element with a role of
row will not fulfill the requirement that listbox allows children with option or group roles.
The required accessibility parent (simplified as "parent") role defines the container where this role is allowed. If a role has a required accessibility parent, authors MUST
ensure that an element with the role is an accessibility child of an element with the required accessibility parent role. For example, an element with role listitem is
only meaningful when it is a child of an element with role list.
To determine whether an element has a parent with the required role, user agentsMUST ignore any elements with the role generic or none.
Also, user agentsSHOULD ignore the role if it occurs outside the context of a required accessibility parent role.
author: name comes from values provided by the author in explicit markup features such as the aria-label attribute, the aria-labelledby attribute, or the host
language labeling mechanism, such as the alt or title attributes in HTML, with HTML title attribute
having the lowest precedence for specifying a text alternative.
contents: name comes from the text value of the element node. Although this might be allowed in addition to "author" in some roles, this is used in content only if higher
priority "author" features are not provided. Priority is defined by the Accessible Name and Description Computation [ACCNAME-1.2].
prohibited: the element does not support name from author. Authors MUST NOT use the aria-label or aria-labelledby attributes to name the element.
Indicates whether DOM descendants are presentational. user agentsSHOULD NOT expose descendants of this element through the platform
accessibility API. If user agents do not hide the descendant nodes, some information might be read twice.
Authors MUST NOT specify aria-owns on an element which has Presentational Children.
5.2.10 Implicit Value for Role
Many states and properties have default values. Occasionally, the default value when used on a given role should be different from the usual default. Roles that require a state or property
to have a non-standard default value indicate this in the "Implicit Value for Role". This is expressed in the form "Default for state or property name is
new default value". Roles that define this have the new default value for the state or property if the author does not provide an explicit value.
5.3 Categorization of Roles
To support the current user scenario, this specification categorizes roles that define user interface widgets (sliders, tree controls, etc.) and those that define page
structure (sections, navigation, etc.). Note that some assistive technologies provide special modes of interaction for regions marked with role application or
document.
A visual description of the relationships among roles is available in the ARIA 1.2 Class Diagram.
The following roles are regions of the page intended as navigational landmarks. All of these roles inherit from the landmark base type and all are imported from
the Role Attribute [ROLE-ATTRIBUTE]. The roles are included here in order to make them clearly
part of the WAI-ARIA Roles Model.
Typically, assistive technology will only convey changes to a live region, not the initial contents of a live region. To ensure content in a live region is announced, authors
SHOULD create a rendered but empty live region as early as possible (such as on page load), and then modify the content of the live region when the author expects changes to be spoken or
brailled. The exception to this live region convention is alert, due to system accessibility notifications events required for the role. While an alert is a live
region, its content is announced by assistive technology when the alert is rendered on the page and when the content changes.
A structure containing one or more focusable elements requiring user input, such as keyboard or gesture events, that do not follow a standard interaction pattern
supported by a widget role.
A landmark that is designed to be complementary to the main content that it is a sibling to, or a direct descendant of. The contents of a complementary landmark would be
expected to remain meaningful if it were to be separated from the main content it is relevant to.
A deletion represents content that is marked as removed, content that is being suggested for removal, or content that is no longer relevant in the context of its accompanying content.
See related insertion.
A perceivable section of content that typically contains a graphical document, images, media player, code snippets, or example text. The parts of a
figureMAY be user-navigable.
A composite widget containing a collection of one or more rows with one or more cells where some or all cells in the grid are focusable by using methods of
two-dimensional navigation, such as directional arrow keys.
A perceivable section containing content that is relevant to a specific, author-specified purpose and sufficiently important that users will likely want to be able to
navigate to the section easily and to have it listed in a summary of the page. Such a page summary could be generated dynamically by a user agent or assistive technology.
An interactive reference to an internal or external resource that, when activated, causes the user agent to navigate to that resource. See related button.
A landmark containing content that is relevant to a specific, author-specified purpose and sufficiently important that users will likely want to be able to navigate to the
section easily and to have it listed in a summary of the page. Such a page summary could be generated dynamically by a user agent or assistive technology.
A graphical object that controls the scrolling of content within a viewing area, regardless of whether the content is fully displayed within the viewing area.
A landmark region that contains a collection of items and objects that, as a whole, combine to create a search facility. See related form and
searchbox.
A set of user interface objects and information representing information about its closest ancestral content group. For instance, a sectionfooter can include information
about who wrote the specific section of content, such as an article. It can contain links to related documents, copyright information or other indices and colophon specific
to the current section of the page.
A set of user interface objects and information that represents a collection of introductory items for the element's closest ancestral content group. For instance, a
sectionheader can include the heading, introductory statement and related meta data for a section of content, for instance a region or article,
within a web page.
A type of live region whose content is advisory information for the user but is not important enough to justify an alert, often but not necessarily presented as a
status bar.
A type of live region containing a numerical counter which indicates an amount of elapsed time from a start point, or the time remaining until an end point.
A type of live region with important, and usually time-sensitive, information. See related alertdialog and status.
Alerts are used to convey messages that will be immediately important to users. In the case of audio warnings, visibly displayed alerts provide an accessible alternative to audible
alerts for Deaf or hard-of-hearing users. Likewise, alerts can provide an accessible alternative to the visible alerts for blind, deaf-blind, or low-vision users, and others with certain
developmental disabilities. The alertrole is applied to the element containing the alert message.
Alert is a special type of assertive live region that is intended to cause immediate notification for assistive technology users. If the operating system allows, the
user agentSHOULD fire a system alert event through the accessibility API when the alert is rendered.
Neither authors nor user agents are required to set or manage focus to an alert in order for it to be processed. Since alerts are not required to receive focus, authors SHOULD NOT
require users to close an alert. If an author desires focus to move to a message when it is conveyed, the author SHOULD use alertdialog instead of alert.
Elements with the role alert have an implicit aria-live value of assertive, and an implicit aria-atomic value of true.
A type of dialog that contains an alert message, where initial focus goes to an element within the dialog. See related alert and dialog.
Alert dialogs are used to convey messages to alert the user. The alertdialogrole goes on the node containing both the alert message and the rest of the
dialog. Authors SHOULD make alert dialogs modal by ensuring that, while the alertdialog is shown, keyboard and mouse interactions only operate within the dialog. See
aria-modal.
Alertdialog is a special type of dialog that is intended to cause an immediate, alert-level notification for assistive technology users. If the operating system allows, the
user agentSHOULD fire a system alert event through the accessibility API when the alert dialog is rendered.
Unlike alert, alertdialog can receive a response from the user. For example, to confirm that the user understands the alert being generated. When the alert
dialog is displayed, authors SHOULD set focus to an active element within the alert dialog, such as a form control or confirmation button. The user agentSHOULD fire a system
alert event through the accessibility API when the alert is created, provided one is specified by the intended
accessibility API.
Authors SHOULD provide an accessible name for an alertdialog, which can be done with the aria-label or aria-labelledby attribute.
Authors SHOULD use aria-describedby on an alertdialog to reference the alert message element in the dialog. If they do not, an assistive technology can
resort to its internal recovery mechanism to determine the contents of the alert message.
A structure containing one or more focusable elements requiring user input, such as keyboard or gesture events, that do not follow a standard interaction pattern
supported by a widget role.
Some user agents and assistive technologies have a browse mode where standard input events, such as up and down arrow key events, are intercepted and used to control a reading
cursor. This browse mode behavior prevents elements that do not have a widget role from receiving and using such keyboard and gesture events to provide interactive
functionality.
When there is a need to create an element with an interaction model that is not supported by any of the WAI-ARIA
widget roles, authors MAY give that element role application. And, when a user navigates into an element with role application,
assistive technologies that intercept standard input events SHOULD switch to a mode that passes most or all standard input events through to the web application.
For example, a presentation slide editor uses arrow keys to change the positions of textbox and image elements on the slide. There are not any WAI-ARIA widget roles that
correspond to such an interaction model so an author could give the slide container role application, an aria-roledescription of "Slide Editor", and
use aria-describedby to provide instructions.
Because only the focusable elements contained in an application element are accessible to users of some assistive technologies, authors MUST use one of the following
techniques to ensure all non-decorative static text or image content inside an application is accessible:
A section of a page that consists of a composition that forms an independent part of a document, page, or site.
An article is not a navigational landmark, but can be nested to form a discussion where assistive technologies could pay attention to article nesting to assist the user in
following the discussion. An article could be a forum post, a magazine or newspaper article, a web log entry, a user-submitted comment, or any other independent item of content. It is
independent in that its contents could stand alone, for example in syndication. However, the element is still associated with its ancestors; for instance, contact
information that applies to a parent body element still covers the article as well. When nesting articles, the child articles represent content that is related to the content of the
parent article. For instance, a web log entry on a site that accepts user-submitted comments could represent the comments as articles nested within the article for the web log entry.
Author, heading, date, or other information associated with an article does not apply to nested articles.
When the user navigates to an element assigned the role of article, assistive technologies that typically intercept standard keyboard events SHOULD switch to document
browsing mode, as opposed to passing keyboard events through to the web application. Some assistive technologies provide a feature allowing the user to navigate the hierarchy of any
nested article elements.
A landmark that contains mostly site-oriented content, rather than page-specific content.
Site-oriented content typically includes things such as the logo or identity of the site sponsor, and a site-specific search tool. A banner usually appears at the top of the page and
typically spans the full width.
Assistive technologiesSHOULD enable users to quickly navigate to elements with role banner. user agentsSHOULD treat elements with role banner as
navigational landmarks. user agentsMAY enable users to quickly navigate to elements with role banner.
The author SHOULD mark no more than one element on a page with the bannerrole.
Note
Because document and application elements can be nested in the DOM, they can have multiple
banner elements as DOM descendants, assuming each of those is associated with different document nodes, either by a DOM nesting
(e.g., document within document) or by use of the aria-ownsattribute.
An input that allows for user-triggered actions when clicked or pressed. See related link.
Buttons are mostly used for discrete actions. Standardizing the appearance of buttons enhances the user's recognition of the widgets as buttons and allows for a more compact
display in toolbars.
Buttons support the optional attributearia-pressed. Buttons with a non-empty aria-pressed attribute are toggle buttons. When
aria-pressed is true the button is in a "pressed" state, when aria-pressed is false it is not pressed. If the attribute is not
present, the button is a simple command button.
The caption is the first or last non-generic descendant of a figure.
If the caption represents an accessible name for its containing element, authors SHOULD specify aria-labelledby on the containing element to reference the
element with role caption.
<divrole="radiogroup"aria-labelledby="cap"><divrole="caption"id="cap">
Choose your favorite fruit
</div><!-- ... -->
If a caption contains content that serves as both a name and description for its containing element, authors MAY instead specify aria-labelledby to reference an
element within the caption that represents the "name" of the containing element, and specify aria-describedby to reference an element within the
caption that represents the descriptive content.
<divrole="table"aria-labelledby="name"aria-describedby="desc"><divrole="caption"><divid="name">Contest Entrants</div><divid="desc">
This table shows the total number of entrants (500) the
contest accepted over the past four weeks.
</div></div><!-- ... -->
If the caption represents a long-form description, or if the description contains semantic elements which are important in understanding the description, authors MAY instead
specify aria-labelledby to reference an element within the caption that represents the "name" of the containing element, and specify
aria-details to reference an element within the caption that represents the descriptive content.
<divrole="figure"aria-labelledby="name"aria-details="details"><!-- figure content here, such as a complex data viz SVG --><divrole="caption"><divid="name">Sales information for 20XX</div><divid="details">
This barchart represents the total amount of sales over the course
of five years. <ahref="...">Sales information for last year</a> can
be reviewed, or you can overlay <buttonaria-pressed="false">previous year</button>
information in this graphic.
</div></div><!-- ... -->
If a caption contains only a description, without a suitable text string to serve as the accessible name for its containing element, then aria-label or
aria-labelledbyMAY be used to provide an accessible name, and the captionMAY be treated solely as descriptive content, referenced via
aria-details.
<divrole="figure"aria-label="Sales information"aria-details="details"><!-- figure content here, such as a complex data viz SVG --><divrole="caption"id="details">
This barchart represents the total amount of sales over the course
of five years. <ahref="...">Sales information for last year</a> can
be reviewed, or you can overlay <buttonaria-pressed="false">previous year</button>
information in this graphic.
</div><!-- ... -->
A checkable input that has three possible values: true, false, or mixed.
The aria-checkedattribute of a checkbox indicates whether the input is checked (true), unchecked (false), or represents a
group of elements that have a mixture of checked and unchecked values (mixed). Many checkboxes do not use the mixed value, and thus are effectively boolean
checkboxes.
Note
Due to the strong native semantics of HTML's native checkbox, authors are advised against using aria-checked on an input type=checkbox. Rather, use the native
checked attribute or the indeterminate IDL attribute to specify the checkbox's "checked" or "mixed" state, respectively.
A section whose content represents a fragment of computer code.
The primary purpose of the code role is to inform assistive technologies that the content is computer code and thus might require special presentation, in particular with respect to
synthesized speech. More specifically, screen readers and other tools which provide text-to-speech presentation of content SHOULD prefer full punctuation verbosity to ensure common
symbols (e.g., "-") are spoken.
A cell containing header information for a column.
columnheader can be used as a column header in a table or grid. It could also be used in a pie chart to show a similar relationship in the data.
The columnheader establishes a relationship between it and all cells in the corresponding column. It is the structural equivalent to an HTML thelement with a column scope.
Applying the aria-selected state on a columnheader MUST not cause the user agent to automatically propagate the aria-selected state to all the cells in the
corresponding column. An author MAY choose to propagate selection in this manner depending on the specific application.
While the columnheader role can be used in both interactive grids and non-interactive tables, the use of aria-readonly and aria-required is only
applicable to interactive elements. Therefore, authors SHOULD NOT use aria-required or aria-readonly in a columnheader that descends from a
table, and user agents SHOULD NOT expose either property to assistive technologies unless the columnheader descends from a grid.
Note
Because cells are organized into rows, there is not a single container element for the column. The column is the set of gridcell elements in a particular position within
their respective row containers.
Note: Usage of aria-disabled
While aria-disabled is currently supported on columnheader, in a future version the working group plans to prohibit its use on elements with role
columnheader except when the element is in the context of a grid or treegrid.
An input that controls another element, such as a listbox or grid, that can dynamically pop up to help the user set the value of the
input.
Editor's note: Major Changes to combobox role in ARIA 1.2
The Guidance for combobox has changed significantly in ARIA 1.2 due to problems with implementation of the previous patterns. Authors and developers of User Agents,
Assistive Technologies, and Conformance Checkers are advised to review this section carefully to understand the changes. Explanation of the changes is available in the
ARIA repository wiki.
A combobox functionally combines a named input field with the ability to assist value selection via a supplementary popup element. A combobox input MAY be
either a single-line text field that supports editing and typing or an element that only displays the current value of the combobox. If the combobox supports
text input and provides autocompletion behavior as described in aria-autocomplete, authors MUST set aria-autocomplete on the combobox element to
the value that corresponds to the provided behavior.
Typically, the initial state of a combobox is collapsed. In the collapsed state, only the combobox element and a separate, optional popup control
button are visible. A combobox is said to be expanded when both the combobox element showing its current value and its associated popup element are
visible. Authors MUST set aria-expanded to true on an element with role combobox when it is expanded and false when it is collapsed.
Elements with the role combobox have an implicit aria-haspopup value of listbox. If the combobox popup element has a role other than
listbox, authors MUST specify an aria-haspopup value of tree, grid, or dialog that corresponds to the role of its popup.
If the user interface includes an additional icon that allows the visibility of the popup to be controlled via pointer and touch events, authors SHOULD ensure that element has role
button, that it is focusable but not included in the page Tab sequence, and that it is not a descendant of the element with role combobox. In
addition, to be keyboard accessible, authors SHOULD provide keyboard mechanisms for moving focus between the combobox element and elements contained in the popup. For
example, one common convention is that Down Arrow moves focus from the input to the first focusable descendant of the popup element. If the popup element supports
aria-activedescendant, in lieu of moving focus, such keyboard mechanisms can control the value of aria-activedescendant on the combobox element.
When a descendant of the popup element is active, authors MAY set aria-activedescendant on the combobox to a value that refers to the active element within the
popup while focus remains on the combobox element.
User agents MUST expose the value of elements with role combobox to assistive technologies. The value of a combobox is represented by one of the
following:
If the combobox element is a host language element that provides a value, such as an HTML input element, the value of the combobox is the value of that
element.
Otherwise, the value of the combobox is represented by its descendant elements and can be determined using the same method used to compute the name of a
button from its descendant content.
Editor's note: Validity changes combobox for ARIA 1.2
Please review the following carefully. As a result of these changes a combobox following the ARIA 1.1 combobox specification will no longer conform with the ARIA specification.
Note
The structural requirements for combobox defined by this version of the specification are different from the requirements defined by ARIA 1.0 and ARIA 1.1:
The ARIA 1.0 specification required the input element with the combobox role to be a single-line text field and reference the popup element with
aria-owns instead of aria-controls.
The ARIA 1.1 specification, which was not broadly supported by assistive technologies, required the combobox to be a non-focusable element with two required
accessibility children -- a focusable textbox and a popup element controlled by the textbox.
The changes introduced in ARIA 1.2 improve interoperability with assistive technologies and enable authors to create presentations of combobox that more closely imitate a native HTML
select element.
The features and behaviors of combobox implementations vary widely. Consequently, there are many important authoring considerations. See the
ARIA Authoring Practices Guide
for additional details on implementing combobox design patterns.
A comment contains content expressing reaction to other content.
Comments can annotate any visible content, from small spans of text, to other comments, to entire articles. Authors SHOULD identify the relationships between comments and the commented
content, as follows:
If the comment is a reply to another comment:
If all ancestor comments are available in the DOM, make each reply comment a semantic descendant of the comment to which it is replying, either by making
it a DOM descendant element or by using aria-owns.
Alternatively, if all ancestor comments are not in the DOM, such as when comments are paginated, the hierarchical level MAY be indicated via aria-level. Additional
group positional information MAY be indicated via aria-posinset and aria-setsize.
Otherwise, if the comment relates to other content in the page:
Provide aria-details on the element containing the commented content with a value refering to the element with role comment.
If there are multiple comments related to the same commented content, either provide a value for aria-details on the commented content that refers to each individual
comment, or use aria-details to refer to a parent container of the comments. If aria-details refers to an element containing comments rather than
comment elements, authors SHOULD assign a role of group or region to the referenced container.
If the author has not explicitly declared aria-level, aria-posinset, or aria-setsize for a comment element, user agents MUST
automatically compute the missing values and expose them to assistive technologies.
A landmark that is designed to be complementary to the main content that it is a sibling to, or a direct descendant of. The contents of a complementary landmark would be
expected to remain meaningful if it were to be separated from the main content it is relevant to.
There are various types of content that would appropriately have this role. For example, in the case of a portal, this can include but not be limited to show times, current
weather, related articles, or stocks to watch. If the complementary content is completely separable from the main content, it might be appropriate to use a more general role.
Assistive technologiesSHOULD enable users to quickly navigate to elements with role complementary. user agentsSHOULD treat elements with role
complementary as navigational landmarks. user agentsMAY enable users to quickly navigate to elements with role complementary.
Authors SHOULD ensure that a composite widget exists as a single navigation stop within the larger navigation system of the web page. Once the composite widget has focus, authors SHOULD
provide a separate navigation mechanism for users to navigate to elements that are accessibility descendants of the composite element.
composite is an abstract role used for the ontology. Authors MUST NOT use composite role in content.
A landmark that contains information about the parent document.
Examples of information included in this region of the page are copyrights and links to privacy statements.
Assistive technologiesSHOULD enable users to quickly navigate to elements with role contentinfo. user agentsSHOULD treat elements with role
contentinfo as navigational landmarks. user agentsMAY enable users to quickly navigate to elements with role contentinfo.
The author SHOULD mark no more than one element on a page with the contentinfo role.
Note
Because document and application elements can be nested in the DOM, they can have multiple
contentinfo elements as DOM descendants, assuming each of those is associated with different document nodes, either by a DOM
nesting (e.g., document within document) or by use of the aria-owns attribute.
A definition of a term or concept. See related term.
Authors MUST identify the element being defined and assign that element a role of term.
Authors SHOULD NOT use the definition role on interactive elements such as form controls because doing so could prevent users of assistive technologies from interacting with
those elements.
A deletion represents content that is marked as removed, content that is being suggested for removal, or content that is no longer relevant in the context of its accompanying content.
See related insertion.
Deletions are typically used to either mark differences between two versions of content or to designate content suggested for removal in scenarios where multiple people are revising
content.
A dialog is a descendant window of the primary window of a web application. For HTML pages, the primary application window is the entire web document.
Dialogs are often used to prompt the user to enter or respond to information, or can represent content related to understanding or modifying the content of the primary application
window. A dialog that is designed to interrupt workflow and prevent users from interacting with the primary web application is usually modal. See related alertdialog. A
dialog that allows for the user to switch between interacting with the content of the primary web application and the content the dialog is usually modeless (i.e., non-modal). In lieu of
using robust host language features for marking content of the primary web application as inert, authors SHOULD use the aria-modal attribute, and constrain
focus to dialogs. See the WAI-ARIA Authoring Practices: Dialog (modal) pattern for additional details on implementing
modal dialog design patterns.
Authors SHOULD provide an accessible name for a dialog, which can be done with the aria-label or aria-labelledby attribute.
Authors SHOULD ensure that all dialogs (both modal and non-modal) have at least one focusable descendant element. Authors SHOULD focus an element in the modal dialog when it is
displayed, and authors SHOULD constrain keyboard focus to focusable elements within a modal dialog, until dismissed.
Authors SHOULD provide a dialog an accessible description, with the aria-describedby attribute, for instances where authors have set initial keyboard focus on an element
that follows content that outlines the purpose of the dialog. Assistive technology SHOULD give precedence to exposing author defined dialog accessible descriptions when a dialog is
invoked and user focus is moved to a descendant of the dialog element.
Note
Authors are strongly encouraged to use aria-describedby, rather than aria-description, to provide descriptions to dialogs. While
aria-description could be used to provide an accessible description for a dialog, it will provide a better and more consistent user experience to reference visible content
that can also be independently read by all users. Doing so will help ensure important descriptive information is less likely to be missed.
Note
In the description of this role, the term "web application" does not refer to the application role, which specifies specific assistive technology behaviors.
[Deprecated in ARIA 1.2] A list of references to members of a group, such as a static table of contents.
Note
As exposed by accessibility APIs, the directoryrole is essentially equivalent to the listrole. So, using directory does not provide
any additional benefits to assistive technology users. Authors are advised to treat directory as deprecated and to use list, or a host language's equivalent
semantics instead.
A directory is a static table of contents, whether linked or unlinked. This includes tables of contents built with lists, including nested lists. Dynamic tables of contents,
however, might use a tree role instead.
When user agent focus moves to an element assigned the role of document, assistive technologies having a reading mode for browsing static content MAY switch to
that reading mode and intercept standard input events, such as Up or Down arrow keyboard events, to control the reading cursor.
Because assistive technologies that have a reading mode default to that mode for all elements except for those with either a widget or application role,
the only circumstance where the document role is useful for changing assistive technology behavior is when the element with role document is a
focusable child element of a widget or application. For example, given an application element which contains some static rich text, the
author can apply role document to the element containing the text and give it a tabindex of 0. When a screen reader user presses the Tab key and
places focus on the document element, the user will be able to read the text with the screen reader's reading cursor.
One or more emphasized characters. See related strong.
The purpose of the emphasis role is to stress or emphasize content. It is not for communicating changes in typographical presentation that do not impact the meaning of the
content. Authors SHOULD use the emphasis role only if its absence would change the meaning of the content.
The emphasis role is not intended to convey importance; for that purpose, the strong role is more appropriate.
A scrollable list of articles where scrolling might cause articles to be added to or removed from either end of
the list.
A feed enables users of assistive technologies that have a document browse mode, such as screen readers, to use the browse mode reading cursor to both read and scroll
through a stream of rich content that might continue scrolling infinitely by loading more content as the user reads. In a feed, assistive technologies provide a web
application with signals of the user's reading cursor movement by moving user agent focus, enabling the application to both add new content and visually position content as the
user browses the page. The feed also lets authors inform assistive technologies when additions and removals are occurring so assistive technologies can more reliably update
their reading view without disrupting reading or degrading performance.
For example, a feed could be used to present a stream of news stories where each article contains a story with text, links, images, and comments as well as
widgets for sharing and commenting. As a screen reader user reads and interacts with each story and moves the screen reader reading cursor from story to story, each story scrolls into
view and, as needed, new stories are loaded.
A feed is a container element whose children have role article. When articles are added or removed from either or both ends of a
feed, authors SHOULD set aria-busy to true on the feed element before the changes are made and set it to false after the
changes are complete. Authors SHOULD avoid inserting or removing articles in the middle of a feed. These requirements help
assistive technologies gracefully respond to changes in the feed content that occur simultaneously with user commands to move the reading cursor within the
feed.
Authors SHOULD make each article in a feedfocusable and ensure that the application scrolls an article into view when
user agent focus is set on the article or one of its descendant elements. For example, in HTML, each article element should have a
tabindex value of either -1 or 0.
When an assistive technology reading cursor moves from one article to another, assistive technologiesSHOULD set user agent focus on the
article that contains the reading cursor. If the reading cursor lands on a focusable element inside the article, the assistive technology MAY set focus on that
element in lieu of setting focus on the containing article.
Because the ability to scroll to another article with an assistive technology reading cursor depends on the presence of another article in the page,
authors SHOULD attempt to load additional articles before user agent focus reaches an article at either end of the set of
articles that has been loaded. Alternatively, authors MAY include an article at either or both ends of the loaded set of
articles that includes an element, such as a button, that lets the user request more articles to be loaded.
In addition to providing a brief label, authors MAY apply aria-describedby to article elements in a feed to suggest to screen readers which
elements to speak after the label when users navigate by article. Screen readers MAY provide users with a way to quickly scan feed content by speaking both the
label and accessible description when navigating by article, enabling the user to ignore repetitive or less important elements, such as embedded
interaction widgets, that the author has left out of the description.
Authors SHOULD provide keyboard commands for moving focus among articles in a feed so users who do not utilize an assistive technology that
provides article navigation features can use the keyboard to navigate the feed.
If the number of articles available in a feed supply is static, authors MAY specify aria-setsize on article elements in that feed.
However, if the total number is extremely large, indefinite, or changes often, authors MAY set aria-setsize to -1 to communicate the unknown size of the set.
A perceivable section of content that typically contains a graphical document, images, media player, code snippets, or example text. The parts of a
figureMAY be user-navigable.
Authors SHOULD provide a reference to the figure from the main text, but the figure need not be displayed at the same location as the referencing element.
Authors MAY provide a figure a caption which can include its name, descriptive text, or both. If a caption is provided, and it serves as a
description to the contents of the figure, authors SHOULD associate it to the figure element using aria-details.
Authors MAY provide a figure an accessible name using aria-label or use aria-labelledby to reference other text in the page to serve as the
element's label and accessible name.
Please refer to the caption role for more information on how to associate a figure with its caption.
Assistive technologiesSHOULD enable users to quickly navigate to figures. User agentsMAY enable users to quickly navigate to figures.
A landmark region that contains a collection of items and objects that, as a whole, combine to create a form. See related search.
A form can contain a mix of host language form controls, scripted controls, and hyperlinks. Authors are reminded to use native host language semantics to create form controls whenever
possible. If the purpose of a form is to submit search criteria, authors SHOULD use the search role instead of the generic form role.
Authors SHOULD give each element with role form a brief label that describes the purpose of the form. Authors SHOULD reference a visible label with
aria-labelledby if a visible label is present. Authors SHOULD include the label inside of a heading whenever possible. The heading MAY be an instance of the standard host
language heading element or an instance of an element with role heading.
If an author uses a script to submit a form based on a user action that would otherwise not trigger an onsubmit event (for example, a form submission triggered by the user
changing a form element's value), the author SHOULD provide the user with advance notification of the behavior.
Assistive technologiesSHOULD enable users to quickly navigate to elements with role form. User agentsSHOULD treat elements with role form and an
accessible name as navigational landmarks. User agentsMAY enable users to quickly navigate to elements with role form.
A nameless container element that has no semantic meaning on its own.
The generic role is intended for use as the implicit role of generic elements in host languages (such as HTML div or span), so is primarily for
implementors of user agents. Authors SHOULD NOT use this role in content. Authors MAY use presentation or none to remove implicit accessibility semantics, or a
semantic container role such as group to semantically group descendants in a named container.
Like an element with role presentation, an element with role generic can provide a limited number of accessible states and properties for its descendants, such
as aria-live attributes.
However, unlike elements with role presentation, user agents expose generic elements in accessibility APIs when permitted accessibility attributes have
been specified. User agents MAY otherwise ignore generic elements if such permitted attributes have not been specified.
A composite widget containing a collection of one or more rows with one or more cells where some or all cells in the grid are focusable by using methods of
two-dimensional navigation, such as directional arrow keys.
The grid role does not imply a specific visual, e.g., tabular, presentation. It describes relationships among elements. It can be used for purposes as simple as
grouping a collection of checkboxes or navigation links or as complex as creating a full-featured spreadsheet application.
To be keyboard accessible, authors SHOULD manage focus of descendants of a grid as described in Managing Focus. When a user is navigating
the grid content with a keyboard, authors SHOULD set focus as follows:
If a gridcell contains a single interactive widget that will not consume arrow key presses when it receives focus, such as a checkbox,
button, or link, authors MAY set focus on the interactive element contained in that cell. This allows the contained widget to be directly operable.
Authors SHOULD provide a mechanism for changing to an interaction or edit mode that allows users to navigate and interact with content contained inside a focusable cell if that focusable
cell contains any of the following:
a widget that requires arrow keys to operate, e.g., a combobox or radiogroup
multiple interactive elements
editable content
For example, if a cell in a spreadsheet contains a combobox or editable text, the Enter key might be used to activate a cell interaction or editing mode when that
cell has focus so the directional arrow keys can be used to operate the contained combobox or textbox. Depending on the implementation, pressing
Enter again, Tab, Escape, or another key might switch the application back to the grid navigation mode.
Authors MAY use a gridcell to display the result of a formula, which could be editable by the user. In a spreadsheet application, for example, a gridcell might
show a value calculated from a formula until the user activates the gridcell for editing when a textbox appears in the gridcell containing the
formula in an editable state.
In a grid that provides cell content editing functions, if the content of a focusable gridcell element is not editable, authors MAY set
aria-readonly to true on the gridcell element. However, the value of aria-readonly, whether specified for a grid or
individual cells, only indicates whether the content contained in cells is editable. It does not represent availability of functions for navigating or manipulating the
grid itself.
An unspecified value for aria-readonly does not imply that a grid or a gridcell contains editable content. For example, if a
grid presents a collection of elements that are not editable, such as a collection of link elements representing dates in a datepicker, it is not necessary for
the author to specify a value for aria-readonly.
Authors MAY indicate that a focusable gridcell is selectable as the object of an action with the aria-selected attribute. If the grid allows
multiple gridcells to be selected, the author SHOULD set aria-multiselectable to true on the element with role grid.
Since WAI-ARIA can augment an element of the host language, a grid can reuse the elements and attributes of a
native table, such as an HTML table element. For example, if an author applies the grid role to an HTML table element, the author does not need to
apply the row and gridcell roles to the descendant HTML tr and td elements because the user agent will automatically make the
appropriate translations. When the author is reusing a native host language table element and needs a gridcell element to span multiple rows or columns, the author SHOULD
apply the appropriate host language attributes instead of WAI-ARIA aria-rowspan or
aria-colspan properties.
Authors SHOULD provide an accessible name for a grid, which can be done with the aria-label or aria-labelledby attribute. Authors SHOULD reference
a visible label with aria-labelledby if a visible label is present for the grid.
A gridcell can be focusable, editable, and selectable. A gridcell can have relationships such as aria-controls to address the
application of functional relationships.
If an author intends a gridcell to have a row header, column header, or both, and if the relevant headers cannot be determined from the
DOM structure, authors SHOULD explicitly indicate which header cells are relevant to the gridcell by applying
aria-describedby on the gridcell and referencing elements with rolerowheader or columnheader.
In a treegrid, authors MAY define a gridcell as expandable by using the aria-expanded attribute. If the aria-expanded attribute is
provided, it applies only to the individual cell. It is not a proxy for the container row, which also can be expanded. The main use case for providing this attribute on a
gridcell is pivot table behavior.