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 DocumentThis 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.
The Accessible Rich Internet Applications Working Group seeks feedback on any aspect of the specification. When submitting feedback, please consider issues in the context of the companion documents. To comment, file an issue in the W3C ARIA GitHub repository. If this is not feasible, send email to public-aria@w3.org (comment archive). In-progress updates to the document can be viewed in the publicly visible editors' draft.
This document was published by the Accessible Rich Internet Applications Working Group as an Editor's Draft.
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.
This document is governed by the 18 August 2025 W3C Process Document.
Table of ContentsThis section is non-normative.
The goals of this specification include:
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.
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.
While it is possible for assistive technologies to access these properties directly through the Document Object Model [DOM], the preferred mechanism is for the user agent to map the states and properties to the accessibility API of the operating system. See the Core Accessibility API Mappings [CORE-AAM-1.2] and the Accessible Name and Description Computation [ACCNAME-1.2] for details.
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 1 The contract model with accessibility APIsFor more information see ARIA Authoring Practices Guide for the use of roles in making interactive content accessible.
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.
This specification defines the basic model for WAI-ARIA, including roles, states, properties, and values. It impacts several audiences:
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:
WAI-ARIA relies on user agent support for its features in two ways:
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.
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.
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.
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.
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.
This section is non-normative.
While some terms are defined in place, the following definitions are used throughout this document.
Operating systems and other platforms provide a set of interfaces that expose information about objects and events to assistive technologies. Assistive technologies use these interfaces to get information about and interact with those widgets. Examples of accessibility APIs are Microsoft Active Accessibility [MSAA], Microsoft User Interface Automation [UI-AUTOMATION], MSAA with UIA Express [UIA-EXPRESS], the Mac OS X Accessibility Protocol [AXAPI], the Linux/Unix Accessibility Toolkit [ATK] and Assistive Technology Service Provider Interface [AT-SPI], and IAccessible2 [IAccessible2].
A node in the accessibility tree of a platform accessibility API. Accessible objects expose various states, properties, and events for use by assistive technologies. In the context of markup languages (e.g., HTML and SVG) in general, and of WAI-ARIA in particular, markup elements and their attributes are represented as accessible objects.
Hardware and/or software that:
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:
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.
Used in an attribute description to denote that the value type is an integer, number, or string.
Related Terms: Identifies, Indicates
Event from/to the host operating system via the accessibility API, notifying of a change of input focus.
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.
Translated to platform-specific accessibility APIs as defined in the Core Accessibility API Mappings.
An element or area matching the definition of focusable area in the HTML Specification.
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).
Indicates that the element is excluded from the accessibility tree and therefore not exposed to accessibility APIs.
Related: Excluding Elements in the Accessibility Tree, hidden from all users, aria-hidden
.
Indicates that the element is not visible, perceivable, or interactive for any user. Note that an element can be hidden but not hidden from all users by using aria-hidden
.
Related: Excluding Elements in the Accessibility Tree, hidden, aria-hidden
.
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).
Used in an attribute description to denote that the value type is a named token or otherwise token-like, including the Boolean-like true/false, true/false/undefined, tristate (true/false/mixed), a single named token, or a token list.
Related Terms: Defines, Identifies
Accessible to the user using a keyboard or assistive technologies that mimic keyboard input, such as a sip and puff tube. References in this document relate to WCAG 2.1 Guideline 2.1: Make all functionality available from a keyboard [WCAG21].
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 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.
Accessibility API state 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.
The Nemeth Braille Code for Mathematics is a braille code for encoding mathematical and scientific notation. See Nemeth Braille on Wikipedia.
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.A description of the characteristics of classes and how they relate to each other.
Usable by users in ways they can control. References in this document relate to WCAG 2.1 Principle 2: Content must be operable [WCAG21]. See Keyboard Accessible.
Presentable to users in ways they can sense. References in this document relate to WCAG 2.1 Principle 1: Content must be perceivable [WCAG21].
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.
A connection between two distinct things. Relationships can be of various types to indicate which object labels another, controls another, etc.
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.
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.
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.
An element specified in a WAI-ARIA relation. For example, in <div aria-controls=”elem1”>
, where “elem1”
is the ID for the target element.
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.
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).
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.
WAI-ARIA processing by the user agent MUST 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.
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.
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.
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.
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.
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.
A WAI-ARIA role is set on an element using a role
attribute, similar to the role
attribute defined in Role Attribute [ROLE-ATTRIBUTE].
<li role="menuitem">Open file…</li>
The definition of each role in the model provides the following information :
searchbox
is a type of textbox
);listitem
is contained inside a list
);checkbox
supports being checked via aria-checked
).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.
User agents MUST use the first token in the sequence of tokens in the role
attribute value that matches the name of any non-abstract WAI-ARIA role. Refer to the section on role
attribute implementation in Host Languages for further details.
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.
<li role="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.
[aria-checked="true"] { font-weight: bold; }
[aria-checked="true"]::before { background-image: url(checked.gif); }
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.
<li role="menuitemcheckbox" aria-checked="true">
<img src="checked.gif" alt="">
Sort by Last Modified
</li>
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.
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.
The user agent MUST do the following to implement aria-activedescendant
:
aria-activedescendant
can be included in the tab order.aria-activedescendant
which points to a valid ID reference.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.aria-activedescendant
attribute and has DOM focus. There are two ways an element can be referenced by aria-activedescendant
. One way is when it is an accessibility descendant of the element with aria-activedescendant
and the other is when it is an accessibility descendant of an element that is controlled by an element with role of combobox
, textbox
or searchbox
with an aria-activedescendant
attribute:
aria-activedescendant
attribute. Native elements that have no role attribute do not need to be checked; their native semantics determine the focusable state.aria-activedescendant
attribute and the element with the aria-activedescendant
attribute has DOM focus.When an assistive technology uses its platform's accessibility API to request a change of focus, user agents MUST do the following:
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.
Note
The inability to set DOM focus to the containing element indicates an author error.
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
.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.
The Roles Model uses the following relationships to relate WAI-ARIA roles to each other and to concepts from other specifications, such as HTML.
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.
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.
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="
defined in HTML. Therefore, a checkbox
">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.
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.
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:
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 agents MUST 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 agents SHOULD 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.
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.
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 agents MUST 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.
Note
Examples of valid ways to mark up allowed accessibility child roles include:
<div role="listbox">
<div role="option">option text</div>
</div>
<div role="listbox">
<div>
<div role="option">option text</div>
</div>
</div>
aria-owns
relationship:
<div role="listbox" aria-owns="id1"></div>
<div role="option" id="id1">option text</div>
aria-owns
relationship with generics intervening:
<div role="listbox" aria-owns="id1"></div>
<div id="id1">
<div>
<div role="option">option text</div>
</div>
</div>
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 agents MUST ignore any elements with the role generic
or none
.
Also, user agents SHOULD ignore the role if it occurs outside the context of a required accessibility parent role.
Determines which content contributes to the Accessible Name and Description Computation [ACCNAME-1.2].
One of the following values:
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.aria-label
or aria-labelledby
attributes to name the element.alert
alertdialog
application
(name required)article
banner
blockquote
button
(name required)cell
checkbox
(name required)columnheader
(name required)combobox
(name required)comment
complementary
contentinfo
dialog
directory
document
feed
figure
form
grid
gridcell
group
heading
(name required)image
(name required)link
(name required)list
listbox
(name required)listitem
log
main
marquee
math
menu
menubar
menuitem
(name required)menuitemcheckbox
(name required)menuitemradio
(name required)meter
(name required)navigation
note
option
(name required)progressbar
(name required)radio
(name required)radiogroup
region
(name required)row
rowgroup
rowheader
(name required)scrollbar
search
searchbox
(name required)sectionfooter
sectionheader
separator
slider
(name required)spinbutton
(name required)status
switch
(name required)tab
(name required)table
tablist
tabpanel
(name required)textbox
(name required)timer
toolbar
tooltip
tree
(name required)treegrid
(name required)treeitem
(name required)button
(name required)cell
checkbox
(name required)columnheader
(name required)comment
gridcell
heading
(name required)link
(name required)menuitem
(name required)menuitemcheckbox
(name required)menuitemradio
(name required)option
(name required)radio
(name required)row
rowheader
(name required)switch
(name required)tab
(name required)tooltip
treeitem
(name required)caption
code
definition
deletion
emphasis
generic
insertion
mark
none
paragraph
strong
subscript
suggestion
superscript
term
time
Indicates whether DOM descendants are presentational. user agents SHOULD 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.
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.
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.
Roles are categorized as follows:
The following roles are used to support the WAI-ARIA Roles Model for the purpose of defining general role concepts.
Abstract roles are used for the ontology. Authors MUST NOT use abstract roles in content.
The following roles act as standalone user interface widgets or as part of larger, composite widgets.
button
checkbox
gridcell
link
menuitem
menuitemcheckbox
menuitemradio
option
progressbar
radio
scrollbar
searchbox
separator
(when focusable)slider
spinbutton
switch
tab
tabpanel
textbox
treeitem
The following roles act as composite user interface widgets. These roles typically act as containers that manage other, contained widgets.
The following roles describe structures that organize content in a page. Document structures are not usually interactive.
application
article
blockquote
caption
cell
code
columnheader
comment
definition
deletion
directory
document
emphasis
feed
figure
generic
group
heading
img
insertion
list
listitem
mark
math
meter
none
note
paragraph
presentation
row
rowgroup
rowheader
separator
(when not focusable)strong
subscript
suggestion
superscript
table
term
time
toolbar
tooltip
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.
The following roles are live regions and can be modified by live region attributes.
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.
The following roles act as windows within the browser or application.
Below is an alphabetical list of WAI-ARIA roles.
Abstract roles are used for the ontology. Authors MUST NOT use abstract roles in content.
alert
alertdialog
and status
.
alertdialog
alert
and dialog
.
application
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.
article
banner
landmark
that contains mostly site-oriented content, rather than page-specific content.
blockquote
button
link
.
caption
figure
, grid
, group
, radiogroup
, table
or treegrid
.
cell
gridcell
.
checkbox
true
, false
, or mixed
.
code
columnheader
combobox
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
.
command
(abstract role)
comment
complementary
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.
composite
(abstract role)
contentinfo
landmark
that contains information about the parent document.
definition
term
.
deletion
insertion
.
dialog
directory
document
emphasis
strong
.
feed
list
of articles
where scrolling might cause articles
to be added to or removed from either end of the list.
figure
section
of content that typically contains a graphical document, images, media player, code snippets, or example text. The parts of a figure
MAY be user-navigable.
form
landmark
region that contains a collection of items and objects that, as a whole, combine to create a form. See related search
.
generic
grid
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.
gridcell
cell
in a grid
or treegrid
.
group
heading
image
img
.
img
image
.
input
(abstract role)
insertion
deletion
.
landmark
(abstract role)
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.
link
button
.
list
section
containing listitem
elements. See related listbox
.
listbox
combobox
and list
.
listitem
log
marquee
.
main
landmark
containing the main content of a document.
mark
marquee
log
.
math
menu
menubar
menu
that usually remains visible and is usually presented horizontally.
menuitem
menu
or menubar
.
menuitemcheckbox
menuitem
with a checkable state whose possible values are true
, false
, or mixed
.
menuitemradio
menuitem
in a set of elements with the same role, only one of which can be checked at a time.
meter
progressbar
.
navigation
landmark
containing a collection of navigational elements (usually links) for navigating the document or related documents.
none
presentation
.
note
section
whose content represents additional information or parenthetical context to the primary content it supplements.
option
listbox
.
paragraph
presentation
none
.
progressbar
radio
radiogroup
radio
buttons.
range
(abstract role)
region
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.
roletype
(abstract role)
row
rowgroup
rowheader
scrollbar
search
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
.
searchbox
textbox
and search
.
section
(abstract role)
sectionfooter
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.
sectionhead
(abstract role)
sectionheader
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.
select
(abstract role)
separator
slider
spinbutton
range
that expects the user to select from among discrete choices.
status
alert
, often but not necessarily presented as a status bar.
strong
emphasis
.
structure
(abstract role)
subscript
superscript
.
suggestion
superscript
subscript
.
switch
checkbox
.
tab
table
section
containing data arranged in rows and columns. See related grid
.
tablist
tab
elements, which are references to tabpanel
elements.
tabpanel
tab
, where each tab
is contained in a tablist
.
term
definition
.
textbox
time
timer
toolbar
tooltip
tree
widget
that allows the user to select one or more items from a hierarchically organized collection.
treegrid
grid
whose rows can be expanded and collapsed in the same manner as for a tree
.
treeitem
tree
.
widget
(abstract role)
window
(abstract role)
alert
role
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 alert
role 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 agent SHOULD 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
.
alertdialog
role
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 alertdialog
role 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 agent SHOULD 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 agent SHOULD 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.
application
role
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:
aria-labelledby
or aria-describedby
.document
or article
.aria-activedescendant
to reference the element containing the focused content.article
role
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.
When an article
is in the context of a feed
, the author MAY specify values for aria-posinset
and aria-setsize
.
blockquote
role
A section of content that is quoted from another source.
button
role
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 attribute aria-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.
caption
role
Visible content that names, or describes a figure
, grid
, group
, radiogroup
, table
or treegrid
.
When using caption
authors SHOULD ensure:
caption
is a descendant of a figure
, grid
, group
, radiogroup
, table
, or treegrid
.caption
is the first non-generic
descendant of a grid
, group
, radiogroup
, table
or treegrid
.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
.
<div role="radiogroup" aria-labelledby="cap">
<div role="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.
<div role="table" aria-labelledby="name" aria-describedby="desc">
<div role="caption">
<div id="name">Contest Entrants</div>
<div id="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.
<div role="figure" aria-labelledby="name" aria-details="details">
<div role="caption">
<div id="name">Sales information for 20XX</div>
<div id="details">
This barchart represents the total amount of sales over the course
of five years. <a href="...">Sales information for last year</a> can
be reviewed, or you can overlay <button aria-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-labelledby
MAY be used to provide an accessible name, and the caption
MAY be treated solely as descriptive content, referenced via aria-details
.
<div role="figure" aria-label="Sales information" aria-details="details">
<div role="caption" id="details">
This barchart represents the total amount of sales over the course
of five years. <a href="...">Sales information for last year</a> can
be reviewed, or you can overlay <button aria-pressed="false">previous year</button>
information in this graphic.
</div>
cell
role checkbox
role
A checkable input that has three possible values: true
, false
, or mixed
.
The aria-checked
attribute 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.
code
role
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.
columnheader
role
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 th
element with a column scope.
Authors MUST ensure elements with role columnheader
are the accessibility children of an element with the role row
.
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
.
combobox
role
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:
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.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.<label id="tag_label" for="tag_combo">Tag</label>
<input type="text" id="tag_combo"
role="combobox" aria-autocomplete="list"
aria-haspopup="listbox" aria-expanded="true"
aria-controls="popup_listbox" aria-activedescendant="selected_option">
<ul role="listbox" id="popup_listbox" aria-labelledby="tag_label">
<li role="option">Zebra</li>
<li role="option" id="selected_option">Zoom</li>
</ul>
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:
combobox
role to be a single-line text field and reference the popup element with aria-owns
instead of aria-controls
.combobox
to be a non-focusable element with two required accessibility children -- a focusable textbox
and a popup element controlled by the textbox
.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.
command
abstract role
A form of widget that performs an action but does not receive input data.
command
is an abstract role used for the ontology. Authors MUST NOT use command
role in content.
complementary
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.
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 technologies SHOULD enable users to quickly navigate to elements with role complementary
. user agents SHOULD treat elements with role complementary
as navigational landmarks. user agents MAY enable users to quickly navigate to elements with role complementary
.
composite
abstract role
A widget that can contain navigable accessibility descendants.
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.
contentinfo
role
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 technologies SHOULD enable users to quickly navigate to elements with role contentinfo
. user agents SHOULD treat elements with role contentinfo
as navigational landmarks. user agents MAY 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.
definition
role
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.
deletion
role
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.
dialog
role
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.
In the following example, the first text field will receive initial focus when the dialog is rendered. As this means focus will be set "after" the preceding content that provides instructions for the form fields, an aria-describedby
attribute is used to expose this content as a description for the dialog
.
<div role="dialog" aria-labelledby="h" aria-describedby="d" aria-modal="true" ...>
<h2 id="h">Add Shipping Address</h2>
<p id="d">By placing an order on this website, you acknowledge we will be sending you tons of junk mail for you to immediately recycle. Thanks!</p>
<label>
Street: <input autofocus ...>
</label>
...
</div>
Note
In the description of this role, the term "web application" does not refer to the application
role, which specifies specific assistive technology behaviors.
directory
role
[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 directory
role is essentially equivalent to the list
role. 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.
document
role
An element containing content that assistive technology users might want to browse in a reading mode.
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.
emphasis
role
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.
feed
role
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 feed
focusable 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 technologies SHOULD 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.
See the ARIA Authoring Practices Guide for additional details on implementing a feed design pattern.
figure
role
A perceivable section
of content that typically contains a graphical document, images, media player, code snippets, or example text. The parts of a figure
MAY 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 technologies SHOULD enable users to quickly navigate to figures. User agents MAY enable users to quickly navigate to figures.
form
role
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 technologies SHOULD enable users to quickly navigate to elements with role form
. User agents SHOULD treat elements with role form
and an accessible name as navigational landmarks. User agents MAY enable users to quickly navigate to elements with role form
.
generic
role
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.
grid
role
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.
The cell elements of a grid
have role gridcell
. Authors MAY designate a cell as a row or column header by using either the rowheader
or columnheader
role in lieu of the gridcell
role. Authors MUST ensure elements with role gridcell
, columnheader
, or rowheader
are accessibility children of elements with role row
, which are in turn are accessibility children of an element with role rowgroup
, or grid
.
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:
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.gridcell
, rowheader
, or columnheader
element.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:
combobox
or radiogroup
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.
If aria-readonly
is set on an element with role grid
, user agents MUST propagate the value to all gridcell
elements that are accessibility descendants of that grid
and expose the value in the accessibility API. An author MAY override the propagated value of aria-readonly
for an individual gridcell
element.
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 gridcell
s 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
.
See the ARIA Authoring Practices Guide for additional details on implementing grid design patterns.
gridcell
role
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 role rowheader
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.
Authors MUST ensure elements with role gridcell are accessibility children of an element with the role row
.
group
role
A set of user interface objects that is not intended to be included in a page summary or table of contents by assistive technologies.
Contrast with region
, which is a grouping of user interface objects that will be included in a page summary or table of contents.
Authors SHOULD use a group
to form a logical collection of items in a widget, such as children in a tree widget forming a collection of siblings in a hierarchy. However, when a group
is used in the context of a listbox
, for example, authors MUST limit its children to option
elements. Therefore, proper handling of group
by authors and assistive technologies is determined by the context in which it is provided.
Authors MAY nest group
elements. If a section is significant enough to warrant inclusion in the web page's table of contents, the author SHOULD assign it a role of region
or a standard landmark role.
heading
role
A heading for a section of the page.
To ensure elements with a role of heading
are organized into a logical outline, authors MUST use the aria-level
attribute to indicate the proper nesting level.
image
role
A container for a collection of elements that form an image. See synonym img
.
An img
can contain captions and descriptive text, as well as multiple image files that when viewed together give the impression of a single image. An img
represents a single graphic within a document, whether or not it is formed by a collection of drawing objects. In order for an element with a role of img
to be perceivable, authors MUST provide the element with an accessible name. This can be done using the aria-label
or aria-labelledby
attribute.
Note
Note regarding the
ARIA1.3
image
role.
The image
role was added to ARIA in version 1.3 as a synonym of the ARIA 1.0 img
role. The image
role improves syntactic consistency with the names of other roles, which are complete words or concatenations of complete words.
img
role
A container for a collection of elements that form an image. See synonym image
.
input
abstract role
A generic type of widget that allows user input.
input
is an abstract role used for the ontology. Authors MUST NOT use input
role in content.
insertion
role
An insertion contains content that is marked as added or content that is being suggested for addition. See related deletion
.
Insertions are typically used to either mark differences between two versions of content or to designate content suggested for addition in scenarios where multiple people are revising content.
landmark
abstract role
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.
landmark
is an abstract role used for the ontology. Authors MUST NOT use landmark
role in content.
Authors designate the purpose of the content by assigning a role that is a subclass of the landmark role and, when needed, by providing a brief, descriptive label.
Elements with a role that is a subclass of the landmark role are known as landmark regions or navigational landmark regions.
Assistive technologies SHOULD enable users to quickly navigate to landmark regions. user agents MAY enable users to quickly navigate to landmark regions.
link
role
An interactive reference to an internal or external resource that, when activated, causes the user agent to navigate to that resource. See related button
.
If this is a native link in the host language (such as an HTML anchor with an href
value), activating the link causes the user agent to navigate to that resource. If this is a simulated link, the author is responsible for managing navigation.
Note
If pressing the link triggers an action but does not change browser focus or page location, authors are advised to consider using the button
role instead of the link
role.
list
role listbox
role listitem
role log
role
A type of live region where new information is added in meaningful order and old information can disappear. See related marquee
.
Examples include chat logs, messaging history, game log, or an error log. In contrast to other live regions, in this role there is a relationship between the arrival of new items in the log and the reading order. The log contains a meaningful sequence and new information is added only to the end of the log, not at arbitrary points.
Elements with the role log
have an implicit aria-live
value of polite
.
main
role
A landmark
containing the main content of a document.
This marks the content that is directly related to or expands upon the central topic of the document. The main
role is a non-obtrusive alternative for "skip to main content" links, where the navigation option to go to the main content (or other landmarks) is provided by assistive technologies, or by a user agent or browser extension, through a keyboard shortcut or UI feature such as a side panel or dialog.
Assistive technologies SHOULD enable users to quickly navigate to elements with role main
. user agents SHOULD treat elements with role main
as navigational landmarks. user agents MAY enable users to quickly navigate to elements with role main
.
The author SHOULD mark no more than one element on a page with the main
role.
Note
Because document
and application
elements can be nested in the DOM, they can have multiple main
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.
mark
role
Content which is marked or highlighted for reference or notation purposes, due to the content's relevance in the enclosing context.
Example uses for mark
include:
Authors SHOULD NOT use mark
for purely decorative styling such as syntax highlighting.
marquee
role
A type of live region where non-essential information changes frequently. See related log
.
Common usages of marquee
include stock tickers and ad banners. The primary difference between a marquee
and a log
is that logs usually have a meaningful order or sequence of important content changes.
Elements with the role marquee
have an implicit aria-live
value of off
.
math
role
Content that represents a mathematical expression.
Content with the role math
is intended to be marked up in an accessible format such as MathML [MathML3], or with another type of textual representation such as TeX or LaTeX, which can be converted to an accessible format by native browser implementations or a polyfill library.
While it is not ideal to use an image of a mathematical expression, there exists a significant amount of legacy content where images are used to represent mathematical expressions. Authors SHOULD ensure that images of math are labeled by text that describes the mathematical expression as it might be spoken.
Note
Browsers that support native implementations of MathML are able to provide a more robust, accessible math experience than can be accomplished with plain text approximations of math. Some rendering engines have close integration with screen readers that allow spacial touch exploration of the formula and refreshable braille display output in the Nemeth Braille format. This level of integration is not supported with images of mathematical formulas, even if the author provides a plain text approximation.
At the time of this writing, some mainstream browsers do not support MathML natively, and must be retrofit using a JavaScript polyfill library. When authoring math content, use native MathML wherever possible, and test thoroughly. Use a polyfill library or provide a fallback image with a text alternative approximation if necessary.
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mi>x</mi>
<mo>=</mo>
<mfrac>
<mrow>
<mo form="prefix">−</mo>
<mi>b</mi>
<mo>±</mo>
<msqrt>
<msup>
<mi>b</mi>
<mn>2</mn>
</msup>
<mo>−</mo>
<mn>4</mn>
<mo>⁢</mo>
<mi>a</mi>
<mo>⁢</mo>
<mi>c</mi>
</msqrt>
</mrow>
<mrow>
<mn>2</mn>
<mo>⁢</mo>
<mi>a</mi>
</mrow>
</mfrac>
</mrow>
<annotation encoding="TeX">
x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
</annotation>
</math>
If a rendering engine does not support a native math format such as MathML, authors MAY use JavaScript to downgrade the content to a format the browser can display, such as this HTML image using a data URI and plain text alternative.
<img role="math" src="..." alt="x=⟮−b±√⟮b²−4ac⟯⟯÷2a">
meter
role
An element that represents a scalar measurement within a known range, or a fractional value. See related progressbar
.
Authors MAY set aria-valuemin
and aria-valuemax
to indicate the minimum and maximum values for the meter
. Otherwise, their implicit values follow the same rules as <input type="
in HTML:range
">
aria-valuemin
is missing or not a number, it defaults to 0 (zero).aria-valuemax
is missing or not a number, it defaults to 100.The value of aria-valuenow
MUST NOT fall below or exceed the computed values of aria-valuemin
and aria-valuemax
, respectively.
Authors SHOULD NOT use the meter
role to indicate progress; the progressbar
role exists to address that need.
Note
Presently, there are no WAI-ARIA properties corresponding to the
, low
, and optimum
attributes supported on the high
<
element in HTML. The addition of these properties will be considered for ARIA version 1.3.meter
>
navigation
role
A landmark
containing a collection of navigational elements (usually links) for navigating the document or related documents.
Assistive technologies SHOULD enable users to quickly navigate to elements with role navigation
. user agents SHOULD treat elements with role navigation
as navigational landmarks. user agents MAY enable users to quickly navigate to elements with role navigation
.
none
role
An element whose implicit native role semantics will not be mapped to the accessibility API. See synonym presentation
.
Note
Note regarding the
ARIA1.1
none
role.
In ARIA 1.1, the working group introduced none
as a synonym to the presentation
role, due to author confusion surrounding the intended meaning of the word "presentation" or "presentational." Many individuals erroneously consider role="presentation"
to be synonymous with aria-hidden="true"
, and we believe role="none"
conveys the actual meaning more unambiguously.
The intended use is when an element is used to change the look of the page but does not have all the functional, interactive, or structural relevance implied by the element type, or can be used to provide for an accessible fallback in older browsers that do not support WAI-ARIA.
Example use cases:
img
role and where the full text alternative is available and is marked up with aria-labelledby
and (if needed) aria-describedby
;For any element with a role of none
/presentation
and which is not focusable, the user agent MUST NOT expose the implicit native semantics of the element (the role and its states and properties) to accessibility APIs. However, the user agent MUST expose content and descendant elements that do not have an explicit or inherited role of none
/presentation
. Thus, the none
/presentation
role causes a given element to be treated as having no role or to be removed from the accessibility tree, but does not cause the content contained within the element to be removed from the accessibility tree.
For example, the following two markup snippets will be exposed similarly to an accessibility API.
<h1 role="none"> Sample Content <a href="...">let's go!</a> </h1>
<span> Sample Content <a href="...">let's go!</a> </span>
In HTML, the <img>
element is treated as a single entity regardless of the type of image file. Consequently, using role="none"
or role="presentation"
on an HTML img
is equivalent to using aria-hidden="true"
. In order to make the image contents accessible, authors can embed the object using an <object>
or <iframe>
element, or use inline SVG code, and follow the accessibility guidelines for the image content.
Authors SHOULD NOT provide a non-empty text alternative when the none
/presentation
role is applied to an image.
In the following code sample, the containing img
and is appropriately labeled by the caption paragraph. In this example the img
element can be marked as none
/presentation
because the role and the text alternatives are provided by the containing element.
<div role="img" aria-labelledby="caption">
<img src="example.png" role="none" alt="">
<p id="caption">A visible text caption labeling the image.</p>
</div>
In the following code sample, because the anchor (HTML a
element) is acting as the treeitem, the list item (HTML li
element) is assigned an explicit WAI-ARIA role of none
/presentation
to override the user agent's implicit native semantics for list items.
<ul role="tree">
<li role="none">
<a role="treeitem" aria-expanded="true">An expanded tree node</a>
</li>
…
</ul>
The none
/presentation
role is used on an element that has implicit native semantics, meaning that there is a default accessibility API role for the element. Some elements are only complete when additional descendant elements are provided. For example, in HTML, table elements (matching the table
role) require tr
descendants (which have an implicit row
role), which in turn require th
or td
children (the columnheader
or rowheader
and cell
roles, respectively). Similarly, lists require list item children. The descendant elements that complete the semantics of an element are described in WAI-ARIA as Allowed Accessibility Child Roles.
When an explicit or inherited role of none
/presentation
is applied to an element with the implicit semantic of a WAI-ARIA role that has Allowed Accessibility Child Roles, in addition to the element with the explicit role of none
/presentation
, the user agent MUST apply an inherited role of none
to any accessibility descendants that do not have an explicit role defined. Also, when an explicit or inherited role of none
/presentation
is applied to a host language element which has specifically allowed children as defined by the host language specification, in addition to the element with the explicit role of none
/presentation
, the user agent MUST apply an inherited role of none
to any specifically allowed children that do not have an explicit role defined.
For any element with an explicit or inherited role of none
/presentation
and which is not focusable, user agents MUST ignore role-specific WAI-ARIA states and properties for that element. For example, in HTML, a ul
or ol
element with a role of none
/presentation
will have the implicit native semantics of its li
elements removed because the list
role to which the ul
or ol
corresponds has an Allowed Accessibility Child Role of listitem
. Likewise, the implicit native semantics of an HTML table
element's thead
/tbody
/tfoot
/tr
/th
/td
descendants will also be removed, because the HTML specification indicates that these are required structural descendants of the table
element.
Note
Only the implicit native semantics of elements that correspond to WAI-ARIA Allowed Accessibility Child Roles are removed. All other content remains intact, including nested tables or lists, unless those elements also have an explicit role of none
/presentation
specified.
For example, according to an accessibility API, the following markup elements might have identical or very similar role semantics (generic or none role) and identical content.
<ul role="none">
<li> Sample Content </li>
<li> More Sample Content </li>
</ul>
<foo>
<foo> Sample Content </foo>
<foo> More Sample Content </foo>
</foo>
Note
There are other WAI-ARIA roles with specific allowed children for which this situation is applicable (e.g., feeds and listboxes), but tables and lists are the most common real-world cases in which the none/presentation inheritance is likely to apply.
For any element with an explicit or inherited role of none
/presentation
, user agents MUST apply an inherited role of none
to all host-language-specific labeling elements for the presentational element. For example, a table
element with a role of none
/presentation
will have the implicit native semantics of its caption
element removed, because the caption is merely a label for the presentational table.
note
role
A section
whose content represents additional information or parenthetical context to the primary content it supplements.
A note
is content provided by the author of the page or document, it is not to be used for providing reactions or suggestions. For these purposes, please review comment
and suggestion
.
When used within the normal flow of a page's content, a note
has an implicit association with the content that it supplements. The following example demonstrates using a note
to call out additional information in the natural reading order of a page:
<p>... the following results outline support for the tested features.</p>
<div role="note">
<p>Please keep in mind that at the time of publishing this page all results were accurate.</p>
<p>If you find any variations in results, please let us know!</p>
</div>
<p>...</p>
In cases where an element with role note
has been determined to need a programmatic association with the content it supplements, authors can use one of the following mechanisms to associate the elements:
note
contains structured or interactive content (for example, a link, button, list, table, etc.) use aria-details
.note
is brief and consists of static text, use aria-describedby
.
...
<button aria-details="info-note">Get Started</button>
...
<div role="note" id="info-note">
<p>Need more information before you get started?</p>
<p>Visit our <a href="...">product description page</a> to get all the information you need.</p>
</div>
option
role paragraph
role
A paragraph of content.
presentation
role
An element whose implicit native role semantics will not be mapped to the accessibility API. See synonym none
.
Note
Note regarding the
ARIA1.1
none
role.
In ARIA 1.1, the working group introduced none
as the preferred synonym to the presentation
role, due to author confusion surrounding the intended meaning of the word "presentation" or "presentational." Many individuals erroneously consider role="presentation"
to be synonymous with aria-hidden="true"
, and the ARIA Working Group believes role="none"
conveys the actual meaning more unambiguously.
progressbar
role
An element that displays the progress status for tasks that take a long time.
A progressbar indicates that the user's request has been received and the application is making progress toward completing the requested action.
Authors MAY set aria-valuemin
and aria-valuemax
to indicate the minimum and maximum progress indicator values. Otherwise, their implicit values follow the same rules as <input type="
in HTML:range
">
aria-valuemin
is missing or not a number, it defaults to 0 (zero).aria-valuemax
is missing or not a number, it defaults to 100.The author SHOULD supply a value for aria-valuenow
unless the value is indeterminate, in which case the author SHOULD omit the aria-valuenow
attribute. Authors SHOULD update this value when the visual progress indicator is updated. If the progressbar
is describing the loading progress of a particular region of a page, authors SHOULD both use aria-describedby
to reference the progressbar status, and set the aria-busy
attribute to true
on the region until it is finished loading. It is not possible for the user to alter the value of a progressbar
because it is always read-only.
radio
role
A checkable input in a group of elements with the same role, only one of which can be checked at a time.
Authors SHOULD ensure that elements with role radio
are explicitly grouped in order to indicate which ones affect the same value. This is achieved by enclosing the radio elements in an element with role radiogroup
. If it is not possible to make the radio buttons DOM children of the radiogroup
, authors SHOULD use the aria-owns
attribute on the radiogroup
element to indicate the relationship to its children.
radiogroup
role
A group of radio
buttons.
A radiogroup
is a type of select
list that can only have a single entry checked at any one time. Authors SHOULD enforce that only one radio button in a group can be checked at the same time. When one item in the group is checked, the previously checked item becomes unchecked (its aria-checked
attribute becomes false
).
Authors SHOULD provide an accessible name for a radiogroup
, 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 radiogroup
.
range
abstract role
An element representing a range of values.
range
is an abstract role used for the ontology. Authors MUST NOT use range
role in content.
region
role
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.
Authors SHOULD limit use of the region role to sections containing content with a purpose that is not accurately described by one of the other landmark roles, such as main
, complementary
, or navigation
.
Authors MUST give each element with role region a brief label that describes the purpose of the content in the region. 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
.
Assistive technologies SHOULD enable users to quickly navigate to elements with role region
. User agents SHOULD treat elements with role region
and an accessible name as navigational landmarks. User agents MAY enable users to quickly navigate to elements with role region
.
roletype
abstract role
The base role from which all other roles inherit.
Properties of this role describe the structural and functional purpose of objects that are assigned this role. A role is a concept that can be used to understand and operate instances.
roletype
is an abstract role used for the ontology. Authors MUST NOT use roletype
role in content.
row
role
A row of cells in a tabular container.
Rows contain cell
or gridcell
elements, and thus serve to organize a table
, grid
, or treegrid
.
While the row role can be used in a table
, grid
, or treegrid
, the semantics of aria-expanded
, aria-posinset
, aria-setsize
, and aria-level
are only applicable to the hierarchical structure of an interactive tree grid. Therefore, authors MUST NOT apply aria-expanded
, aria-posinset
, aria-setsize
, and aria-level
to a row
that descends from a table
or grid
, and user agents SHOULD NOT expose any of these four properties to assistive technologies unless the row
descends from a treegrid
.
Authors MUST ensure elements with role row
are accessibility children of an element with the role table
, grid
, rowgroup
, or treegrid
.
Note: Usage of aria-disabled
While aria-disabled
is currently supported on row
, in a future version the working group plans to prohibit its on elements with role row
except when the element is in the context of a grid
or treegrid
.
rowgroup
role
A structure containing one or more row elements in a tabular container.
The rowgroup
role establishes a relationship with its accessibility children of role row
. It is a structural equivalent to the thead
, tfoot
, and tbody
elements in an HTML table
element.
Authors MUST ensure elements with role rowgroup
are accessibility children of an element with the role grid
, table
, or treegrid
.
Note
The rowgroup
role exists, in part, to support role symmetry in HTML, and allows for the propagation of presentation inheritance on HTML table
elements with an explicit presentation
role applied.
Note
This role does not differentiate between types of row groups (e.g., thead
vs. tbody
), but an issue has been raised for WAI-ARIA 2.0.
scrollbar
role search
role
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 search region can be a mix of host language form controls, scripted controls, and hyperlinks.
Assistive technologies SHOULD enable users to quickly navigate to elements with role search
. user agents SHOULD treat elements with role search
as navigational landmarks. user agents MAY enable users to quickly navigate to elements with role search
.
searchbox
role
A type of textbox intended for specifying search criteria. See related textbox
and search
.
section
abstract role
A renderable structural containment unit on a page.
section
is an abstract role used for the ontology. Authors MUST NOT use section
role in content.
sectionhead
abstract role
A structure that labels or summarizes the topic of its related section.
sectionhead
is an abstract role used for the ontology. Authors MUST NOT use sectionhead
role in content.
select
abstract role
A form widget that allows the user to make selections from a set of choices.
select
is an abstract role used for the ontology. Authors MUST NOT use select
role in content.
separator
role
A divider that separates and distinguishes sections of content or groups of menuitems.
There are two types of separators: a static structure
that provides only a visible boundary and a focusable, interactive widget
that is also moveable. If a separator
is not focusable, it is revealed to assistive technologies as a static structural element. For example, a static separator
can be used to help visually divide two groups of menu items in a menu or to provide a horizontal rule between two sections of a page.
Authors MAY make a separator
focusable to create a widget
that both provides a visible boundary between two sections of content and enables the user to change the relative size of the sections by changing the position of the separator
. A variable separator
widget can be moved continuously within a range, whereas a fixed separator
widget supports only two discrete positions. Typically, a fixed separator
widget is used to toggle one of the sections between expanded and collapsed states.
If the separator
is focusable, authors MUST set the value of aria-valuenow
to a number reflecting the current position of the separator
and update that value when it changes. Authors SHOULD also provide the value of aria-valuemin
if it is not 0
and the value of aria-valuemax
if it is not 100
. If missing or not a number, the implicit values of these attributes are as follows:
aria-valuemin
is 0
.aria-valuemax
is 100
.In applications where there is more than one focusable separator
, authors SHOULD provide an accessible name for each one.
Elements with the role separator
have an implicit aria-orientation
value of horizontal
.
slider
role
An input where the user selects a value from within a given range.
A slider represents the current value and range of possible values via the size of the slider and position of the thumb. It is typically possible to add to or subtract from the current value by using directional keys such as arrow keys.
Authors MAY set the aria-valuemin
and aria-valuemax
attributes. Otherwise, their implicit values follow the same rules as <input type="
in HTML:range
">
aria-valuemin
is missing or not a number, it defaults to 0 (zero).aria-valuemax
is missing or not a number, it defaults to 100.Authors MUST set the aria-valuenow
attribute. If aria-valuenow is missing or has an unexpected value, browsers MAY implement the repair techniques specified in the section describing handling author errors in states and properties, which are equivalent to the repair techniques for <input type="
in HTML.range
">
Elements with the role slider
have an implicit aria-orientation
value of horizontal
.
spinbutton
role
A form of range
that expects the user to select from among discrete choices.
A spinbutton
typically allows users to change its displayed value by activating increment and decrement buttons that step through a set of allowed values. Some implementations display the value in an text field that allows editing and typing but typically limits input in ways that help prevent invalid values.
Although a spinbutton
is similar in appearance to many presentations of select
, it is advisable to use spinbutton
when working with known ranges (especially in the case of large ranges) as opposed to distinct options. For example, a spinbutton
representing a range from 1 to 1,000,000 would provide much better performance than a select
widget representing the same values.
Authors MAY create a spinbutton
with accessibility children, but MUST limit those elements to a textbox
and/or two buttons
. Alternatively, authors MAY apply the spinbutton
role to a text input and create sibling buttons to support the increment and decrement functions.
To be keyboard accessible, authors SHOULD manage focus of descendants for all instances of this role, as described in Managing Focus. When a spinbutton
receives focus, authors SHOULD ensure focus is placed on the textbox
element if one is present, and on the spinbutton
itself otherwise. Authors SHOULD also ensure the up and down arrows on a keyboard perform the increment and decrement functions and that the increment and decrement button
elements are NOT included in the primary navigation ring, e.g., the Tab ring in HTML.
Authors SHOULD set the aria-valuenow
attribute when the spinbutton
has a value. Authors SHOULD set the aria-valuemin
attribute when there is a minimum value, and the aria-valuemax
attribute when there is a maximum value.
status
role
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.
Authors SHOULD ensure an element with role status
does not receive focus as a result of change in status.
Status is a form of live region. If another part of the page controls what appears in the status, authors SHOULD make the relationship explicit with the aria-controls
attribute.
Assistive technologies MAY reserve some cells of a Braille display to render the status.
Elements with the role status
have an implicit aria-live
value of polite
and an implicit aria-atomic
value of true
.
strong
role
Content that is important, serious, or urgent. See related emphasis
.
The purpose of the strong
role is to communicate strong importance, seriousness, or urgency. It is not for communicating changes in typographical presentation that are not important to the meaning of the content. Authors SHOULD use the strong
role only if its absence would change the meaning of the content.
The strong
role is not intended to convey stress or emphasis; for that purpose, the emphasis
role is more appropriate.
structure
abstract role
A document structural element.
Roles for document structure support the accessibility of dynamic web content by helping assistive technologies determine active content versus static document content. Structural roles by themselves do not all map to accessibility APIs, but are used to create widget roles or assist content adaptation for assistive technologies.
structure
is an abstract role used for the ontology. Authors MUST NOT use structure
role in content.
subscript
role
One or more subscripted characters. See related superscript
.
The subscript
role is intended to be used only to mark up typographical conventions that have specific meanings; not for typographical presentation for presentation's sake. In general, authors SHOULD use this role only if the absence of the subscript would change the meaning of the content.
suggestion
role
A single proposed change to content.
For example, in an editing system that supports multiple users, one user can suggest a change, and another user would be responsible for accepting or rejecting the suggestion.
Authors MUST ensure that a suggestion
contains either one insertion
child or one deletion
child or ensure that it contains two children where one is an insertion
and the other is a deletion
. Authors MUST ensure a suggestion
does not contain any other children.
Authors MAY use aria-details
or aria-description
to associate the suggestion
with related information such as comments, authoring info, and time stamps.
<p>
The best pet is a
<span role="suggestion">
<span role="deletion">cat</span>
<span role="insertion">dog</span>
</span>
</p>
When a suggestion is accepted, authors SHOULD remove the suggestion
role, indicating that the proposed revision has been made. After the suggestion
role is removed, child insertion
and deletion
elements can either be retained to document the revision or replaced with the revised content.
superscript
role
One or more superscripted characters. See related subscript
.
The superscript
role is intended to be used only to mark up typographical conventions that have specific meanings; not for typographical presentation for presentation's sake. In general, authors SHOULD use this role only if the absence of the superscript would change the meaning of the content.
switch
role
A type of checkbox that represents on/off values, as opposed to checked/unchecked values. See related checkbox
.
The aria-checked
attribute of a switch
indicates whether the input is on (true
) or off (false
). The mixed
value is invalid, and user agents MUST treat a mixed
value as equivalent to false
for this role.
Note
A switch
provides approximately the same functionality as a checkbox
and toggle button
, but makes it possible for assistive technologies to present the widget in a fashion consistent with its on-screen appearance.
tab
role
A grouping label providing a mechanism for selecting the tab content that is to be rendered to the user.
If a tabpanel
or item in a tabpanel
has focus, the associated tab
is the currently active tab in the tablist
, as defined in Managing Focus. tablist
elements, which contain a set of associated tab
elements, are typically placed near a series of tabpanel
elements, usually preceding it. See the ARIA Authoring Practices Guide for details on implementing a tab set design pattern.
Authors MUST ensure elements with role tab
are accessibility children of an element with the role tablist
.
Authors MUST ensure that if a tab
is active, a corresponding tabpanel
that represents the active tab
is rendered.
Authors SHOULD ensure the tabpanel
associated with the currently active tab is perceivable to the user.
For a single-selectable tablist
, authors SHOULD hide from all users other tabpanel
elements until the user selects the tab associated with that tabpanel. For a multi-selectable tablist
, authors SHOULD ensure that the tab
for each visible tabpanel
has the aria-expanded
attribute set to true
, and that the tabs
associated with the remaining hidden from all users tabpanel
elements have their aria-expanded
attributes set to false
.
Authors SHOULD ensure that a selected tab has its aria-selected
attribute set to true
, that inactive tab elements have their aria-selected
attribute set to false
, and that the currently selected tab provides a visual indication that it is selected.
In certain conditions, a user agent MAY provide an implicit value for aria-selected
for each tab
in a tablist
, and if it does, the user agent MUST ensure the following conditions are met before providing an implicit value:
aria-multiselectable
on the tablist
is false
or undefined
.tab
elements in the tablist
have an explicitly declared value for aria-selected
or aria-expanded
.table
role
A section
containing data arranged in rows and columns. See related grid
.
The table
role is intended for tabular containers which are not interactive. If the tabular container maintains a selection state, provides its own two-dimensional navigation, or allows the user to rearrange or otherwise manipulate its contents or the display thereof, authors SHOULD use grid
or treegrid
instead.
Authors SHOULD provide an accessible name for a table
, 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 table
.
Authors SHOULD prefer the use of the host language's semantics for table whenever possible, such as the <
element in HTML.table
>
tablist
role tabpanel
role
A container for the resources associated with a tab
, where each tab
is contained in a tablist
.
Authors SHOULD associate a tabpanel
element with its tab
, by using the aria-controls
attribute on the tab to reference the tab panel, and/or by using the aria-labelledby
attribute on the tab panel to reference the tab.
tablist
elements are typically placed near, and usually preceding, a series of tabpanel
elements. See the ARIA Authoring Practices Guide for details on implementing a tab set design pattern.
term
role
A word or phrase with an optional corresponding definition. See related definition
.
The term
role is used to explicitly identify a word or phrase for which a definition
has been provided by the author or is expected to be provided by the user. If there is an existing definition
, or a form or form control to enter a definition, authors SHOULD set aria-details
to point to the related element.
Authors SHOULD NOT use the term
role on interactive elements such as links because doing so could prevent users of assistive technologies from interacting with those elements.
textbox
role
A type of input that allows free-form text as its value.
If the aria-multiline
attribute is true
, the widget accepts line breaks within the input, as in an HTML textarea
. Otherwise, this is a simple text box. The intended use is for languages that do not have a text input element, or cases in which an element with different semantics is repurposed as a text field.
Authors MUST limit the children of a textbox to non-interactive, entirely presentational elements such as icons used to visually convey information that is already exposed in an accessible manner. Examples include:
aria-invalid
, aria-errormessage
, or both attributes;Note
In most user agent implementations, the default behavior of the ENTER or RETURN key is different between the single-line and multi-line text fields in HTML. When user has focus in a single-line <input type="text">
element, the keystroke usually submits the form. When user has focus in a multi-line <textarea>
element, the keystroke inserts a line break. The WAI-ARIA textbox
role differentiates these types of boxes with the aria-multiline
attribute, so authors are advised to be aware of this distinction when designing the field.
time
role
An element that represents a specific point in time.
Note
At the present time, there are no WAI-ARIA properties corresponding to the datetime
attribute supported on <
in HTML. The addition of this property will be considered for ARIA version 1.3.time
>
Authors SHOULD limit text contents to a valid date- or time-related string, or apply this future datetime
-equivalent property to the element which has role time
.
Examples of valid date- or time-related strings as text contents of an element with the time
role:
<span role="time">2019-11</span>
<span role="time">2019-11-18</span>
<span role="time">11-18</span>
<span role="time">09:54:39</span>
<span role="time">2019-11-18T14:54</span>
<span role="time">-08:00</span>
<span role="time">2019-11-18T14:54Z</span>
<span role="time">2019-W47</span>
<span role="time">0001</span>
<span role="time">4h 18m 3s</span>
timer
role
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.
The text contents of the timer object indicate the current time measurement, and are updated as that amount changes. The timer value is not necessarily machine parsable, but authors SHOULD update the text contents at fixed intervals, except when the timer is paused or reaches an end-point.
Elements with the role timer
have an implicit aria-live
value of off
.
toolbar
role tooltip
role tree
role
A widget
that allows the user to select one or more items from a hierarchically organized collection.
To be keyboard accessible, authors SHOULD manage focus of descendants for all instances of this role, as described in Managing Focus.
Elements with the role tree
have an implicit aria-orientation
value of vertical
.
treegrid
role treeitem
role widget
abstract role window
abstract role
A browser or application window.
Elements with this role have a window-like behavior in a graphical user interface (GUI) context, regardless of whether they are implemented as a native window in the operating system, or merely as a section of the document styled to look like a window.
window
is an abstract role used for the ontology. Authors MUST NOT use window
role in content.
Note
In the description of this role, the term "application" does not refer to the application
role, which specifies specific assistive technology behaviors.
The terms "states" and "properties" refer to similar features. Both provide specific information about an object, and both form part of the definition of the nature of roles. In this document, states and properties are both treated as aria-prefixed markup attributes. However, they are maintained conceptually distinct to clarify subtle differences in their meaning. One major difference is that the values of properties (such as aria-labelledby
) are often less likely to change throughout the application life-cycle than the values of states (such as aria-checked
) which might change frequently due to user interaction. Note that the frequency of change difference is not a rule; a few properties, such as aria-valuetext
are expected to change often. Because the distinction between states and properties is of little consequence to most authors, this specification refers to both "states" and "properties" simply as "attributes" whenever possible. See the definitions of state and property for more information.
States and properties have the characteristics described in the following sections.
Advisory information about roles that use this state or property. This information is provided to help understand the appropriate usage of the state or property. Use of a given state or property is not defined when used on roles other than those listed.
Advisory information about roles that inherit the state or property from an ancestor role.
Value type of the state or property. The value is one of the following types:
true
or false
. The default value for this value type is false
unless otherwise specified.
true
, false
, mixed
, or undefined
values. The default value for this value type is undefined
unless otherwise specified.
true
, false
, or undefined
(not applicable). The default value for this value type is undefined
unless otherwise specified. For example, an element with aria-expanded
set to false
is not currently expanded; an element with aria-expanded
set to undefined
is not expandable.
These are generic types for states and properties, but do not define specific representation. See State and Property Attribute Processing for details on how these values are expressed and handled in host languages.
When the ARIA attribute definition includes a table listing the attribute's allowed values, that attribute is a multi-value nullable attribute. Each value in the table is a keyword for the attribute, mapping to a state of the same name.
All ARIA attributes reflect in IDL as nullable DOMString
attributes. This includes the boolean-like true/false type, and all other ARIA attributes.
Default values from the ARIA values tables MUST NOT reflect to IDL as the missing value default or the invalid value default for the attribute. On getting, a missing ARIA attribute will return null
. ARIA attributes are not validated on get. If an ARIA value is invalid, on getting, it will return its set value as a literal string, and will not return an invalid value default.
Unlike IDL reflection, operating system accessibility API mappings of ARIA attributes can have defaults. Any default values from the ARIA values tables are exposed to the operating system accessibility API as described in 5.2.3 Supported States and Properties, and in Core Accessibility API Mappings 1.1.
As noted in A. Mapping WAI-ARIA Value types to languages, attributes are included in host languages, and the syntax for representation of WAI-ARIA types is governed by the host language.
The following algorithm should be used for ARIA nullable DOMString
attributes in HTML:
On getting, if the corresponding content attribute is not present, then the IDL attribute must return null, otherwise, the IDL attribute must get the value in a transparent, case-preserving manner. On setting, if the new value is null, the content attribute must be removed, and otherwise, the content attribute must be set to the specified new value in a transparent, case-preserving manner.
Note
Note: As of ARIA 1.2, all ARIA attributes exposed via IDL are defined as nullable DOMString
s. This matches the current implementation of all major rendering engines. This specification change should result in no implementation changes; it will merely represent the current reality of web engines. However, in a future draft, the ARIA Working Group intends to change several ARIA attributes to non-nullable DOMStrings, and seek implementations. The proposed change will bring ARIA into alignment with the HTML’s usage of enumerated attributes.
This section is non-normative.
el.hidden = true;
el.hidden;
el.removeAttribute("hidden");
el.hidden;
el.ariaBusy;
el.ariaBusy = "true";
el.ariaBusy;
el.removeAttribute("aria-busy");
el.ariaBusy;
el.setAttribute("aria-busy", "busy");
el.ariaBusy;
button.ariaPressed;
button.setAttribute("aria-pressed", "true");
button.ariaPressed;
button.ariaPressed = "false";
button.ariaPressed;
button.ariaPressed = "foo";
button.ariaPressed;
button.removeAttribute("aria-pressed");
button.ariaPressed;
The HTML specification states that other specifications can define translatable attributes. The language and directionality of each attribute value is the same as the language and directionality of the element.
To be understandable by assistive technology users, the values of the following states and properties are translatable attributes and should be translated when a page is localized:
aria-braillelabel
aria-brailleroledescription
aria-colindextext
aria-description
aria-label
aria-placeholder
aria-roledescription
aria-rowindextext
aria-valuetext
Some states and properties are applicable to all host language elements regardless of whether a role is applied. The following global states and properties are supported by all roles and by all base markup elements unless otherwise prohibited. If a role prohibits use of any global states or properties, those states or properties are listed as prohibited in the characteristics table included in the section that defines the role.
aria-atomic
aria-braillelabel
(Except where prohibited)aria-brailleroledescription
(Except where prohibited)aria-busy (state)
aria-controls
aria-current (state)
aria-describedby
aria-description
aria-details
aria-disabled (state)
(Global use deprecated in ARIA 1.2)aria-dropeffect
aria-errormessage
(Global use deprecated in ARIA 1.2)aria-flowto
aria-grabbed (state)
aria-haspopup
(Global use deprecated in ARIA 1.2)aria-hidden (state)
aria-invalid (state)
(Global use deprecated in ARIA 1.2)aria-keyshortcuts
aria-label
(Except where prohibited)aria-labelledby
(Except where prohibited)aria-live
aria-owns
aria-relevant
aria-roledescription
(Except where prohibited)States and properties are categorized as follows:
This section contains attributes specific to common user interface elements found on GUI systems or in rich internet applications which receive user input and process user actions. These attributes are used to support the widget roles.
aria-autocomplete
aria-checked
aria-disabled
aria-errormessage
aria-expanded
aria-haspopup
aria-hidden
aria-invalid
aria-label
aria-level
aria-modal
aria-multiline
aria-multiselectable
aria-orientation
aria-placeholder
aria-pressed
aria-readonly
aria-required
aria-selected
aria-sort
aria-valuemax
aria-valuemin
aria-valuenow
aria-valuetext
Widget attributes might be mapped by a user agent to platform accessibility API state, for access by assistive technologies, or they might be accessed directly from the DOM.
This section contains attributes specific to live regions in rich internet applications. These attributes MAY be applied to any element. The purpose of these attributes is to indicate that content changes might occur without the element having focus, and to provide assistive technologies with information on how to process those content updates. Some roles specify a default value for the aria-live
attribute specific to that role. An example of a live region is a ticker section that lists updating stock quotes. User agents MAY ignore changes triggered by direct user action on an element inside a live region (e.g., editing the value of a text field).
This section lists attributes which indicate information about drag-and-drop interface elements, such as draggable elements and their drop targets. Drop target information will be rendered visually by the author and provided to assistive technologies through an alternate modality.
This section lists attributes that indicate relationships or associations between elements which cannot be readily determined from the document structure.
aria-activedescendant
aria-colcount
aria-colindex
aria-colindextext
aria-colspan
aria-controls
aria-describedby
aria-details
aria-errormessage
aria-flowto
aria-labelledby
aria-owns
aria-posinset
aria-rowcount
aria-rowindex
aria-rowindextext
aria-rowspan
aria-setsize
User agents MUST provide a way for assistive technologies to be notified when states change, either through DOM attribute change events or platform accessibility API events.
Below is an alphabetical list of WAI-ARIA states and properties to be used by authors. A detailed definition of each WAI-ARIA state and property follows this compact list.
composite
widget, combobox
, textbox
, group
, or application
.
aria-relevant
attribute.
combobox
, searchbox
, or textbox
and specifies how predictions would be presented if they were made.
aria-label
.
aria-roledescription
.
aria-pressed
and aria-selected
.
table
, grid
, or treegrid
. See related aria-colindex
.
table
, grid
, or treegrid
. See related aria-colindextext
, aria-colcount
, and aria-colspan
.
aria-colindex
. See related aria-rowindextext
.
table
, grid
, or treegrid
. See related aria-colindex
and aria-rowspan
.
aria-details
and aria-owns
.
aria-labelledby
and aria-description
.
aria-describedby
.
aria-describedby
.
aria-hidden
and aria-readonly
.
aria-invalid
and aria-describedby
.
true
, that an element and its entire subtree are hidden from assistive technology, regardless of whether it is visibly rendered.
aria-errormessage
.
aria-labelledby
.
aria-label
and aria-describedby
.
aria-controls
.
aria-setsize
.
aria-checked
and aria-selected
.
aria-disabled
.
aria-atomic
.
table
, grid
, or treegrid
. See related aria-rowindex
.
table
, grid
, or treegrid
. See related aria-rowindextext
, aria-rowcount
, and aria-rowspan
.
aria-rowindex
. See related aria-colindextext
.
table
, grid
, or treegrid
. See related aria-rowindex
and aria-colspan
.
aria-checked
and aria-pressed
.
aria-posinset
.
aria-valuetext
.
aria-valuenow
for a range widget.
aria-activedescendant
property
Identifies the currently active element when DOM focus is on a composite
widget, combobox
, textbox
, group
, or application
.
The aria-activedescendant
property provides an alternative method of managing focus for interactive elements that might contain multiple focusable descendants, such as menus, grids, and toolbars. Instead of moving DOM focus among accessibility descendants, authors MAY set DOM focus on a container element that supports aria-activedescendant
and then use aria-activedescendant
to refer to the element that is active.
Authors MUST ensure that one of the following two sets of conditions is met when setting the value of aria-activedescendant
on an element with DOM focus:
aria-activedescendant
refers to an accessibility descendant.combobox
, textbox
or searchbox
with aria-controls
referring to an element that supports aria-activedescendant
, and the value of aria-activedescendant
refers to an accessibility descendant of the controlled element. For example, in a combobox
, focus can remain on the combobox
while the value of aria-activedescendant
on the combobox
element refers to a descendant of a popup listbox
that is controlled by the combobox
.Authors SHOULD also ensure that the currently active descendant is visible and in view (or scrolls into view) when focused.
aria-atomic
property
Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant
attribute.
Both accessibility APIs and the Document Object Model [DOM] provide events to allow the assistive technologies to determine changed areas of the document.
When the content of a live region changes, user agents SHOULD examine the changed element and traverse the ancestors to find the first element with aria-atomic
set, and apply the appropriate behavior for the cases below.
aria-atomic
, the default is that aria-atomic
is false
, and assistive technologies will only present the changed node to the user.aria-atomic
is explicitly set to false
, assistive technologies will stop searching up the ancestor chain and present only the changed node to the user.aria-atomic
is explicitly set to true
, assistive technologies will present the entire contents of the element, including the author-defined live region label if one exists.When aria-atomic
is true
, assistive technologies can choose to combine several changes and present the entire changed region at once.
aria-autocomplete
property
Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for a combobox
, searchbox
, or textbox
and specifies how predictions would be presented if they were made.
The aria-autocomplete
property describes the type of interaction model a textbox
, searchbox
, or combobox
employs when dynamically helping users complete text input. It distinguishes between two models: the inline model (aria-autocomplete="inline"
) that presents a value completion prediction inside the text input and the list model (aria-autocomplete="list"
) that presents a collection of possible values in a separate element that pops up adjacent to the text input. It is possible for an input to offer both models at the same time (aria-autocomplete="both"
).
The aria-autocomplete
property is limited to describing predictive behaviors of an input element. Authors SHOULD either omit specifying a value for aria-autocomplete
or set aria-autocomplete
to none
if an input element provides one or more input proposals where none of the proposals are dependent on the specific input provided by the user. For instance, a combobox where the value of aria-autocomplete
would be none
is a search field that displays suggested values by listing the 5 most recently used search terms without any filtering of the list based on the user's input. Elements with a role that supports aria-autocomplete
have a default value for aria-autocomplete
of none
.
When an inline suggestion is made as a user types in an input, suggested text for completing the value of the field dynamically appears in the field after the input cursor, and the suggested value is accepted as the value of the input if the user performs an action that causes focus to leave the field. When an element has aria-autocomplete
set to inline
or both
, authors SHOULD ensure that the automatically suggested portion of the text is presented as selected text. This enables assistive technologies to distinguish between a user's input and the automatic suggestion and, in the event that the suggestion is not the desired value, enables the user to easily delete the suggestion or replace it by continuing to type.
If an element has aria-autocomplete
set to list
or both
, authors MUST ensure both of the following conditions are met:
aria-controls
that refers to the element that contains the collection of suggested values.aria-haspopup
that matches the role of the element that contains the collection of suggested values.Some implementations of the list model require the user to perform an action, such as moving focus to the suggestion with the Down Arrow or clicking on the suggestion, in order to choose the suggestion. In such implementations, authors MAY manage focus by either using aria-activedescendant
if the collection container supports it or by moving DOM focus to the suggestion. However, other implementations of the list model automatically highlight one suggestion as the selected value that will be accepted when the field loses focus, e.g., when the user presses the Tab key or clicks on a different field. If an element has aria-autocomplete
set to list
or both
, and if a suggestion is automatically selected as the user provides input, authors MUST ensure all the following conditions are met:
aria-activedescendant
.aria-activedescendant
set on the input field is dynamically adjusted to refer to the element containing the selected suggestion as described in the definition of aria-activedescendant
.The aria-autocomplete
property is not intended to indicate the presence of a completion suggestion, and authors SHOULD NOT dynamically change its value in order to communicate the presence of a suggestion. When an element has aria-autocomplete
set to list
or both
, authors SHOULD use the aria-expanded
state to communicate whether the element that presents the suggestion collection is displayed.
aria-braillelabel
property
Defines a string value that labels the current element, which is intended to be converted into Braille. See related aria-label
.
The purpose of aria-braillelabel
is similar to that of aria-label
. It provides the user with a recognizable name of the object in Braille.
The aria-braillelabel
property gives authors the ability to override how assistive technologies localize and express the accessible name of an element in Braille. Thus inappropriately using aria-braillelabel
might inhibit users' ability to understand an element on braille interfaces. Authors SHOULD limit use of aria-braillelabel
to instances where the name of an element when converted to Braille is not the desired user experience.
When using aria-braillelabel
, authors SHOULD also ensure that:
aria-braillelabel
is applied has a valid accessible name.aria-braillelabel
is not empty or does not contain only whitespace characters.aria-braillelabel
does not contain any characters in Unicode Braille Patterns or consists of only characters in Unicode Braille Patterns; the value does not only contain Braille Pattern dots-0.aria-braillelabel
is not identical to the element's accessible name.Authors MUST NOT specify aria-braillelabel
on an element which has an explicit or implicit WAI-ARIA role where aria-braillelabel
is prohibited.
Note
Note that Assistive Technologies with braille support can convert the accessible name to Braille. In addition, assistive technologies will be able to customize such braille output according to user preferences. Using only the accessible name, e.g., from content or via aria-label
is almost always the better user experience and authors are strongly discouraged from using aria-braillelabel
to replicate aria-label
. Instead, aria-braillelabel
is meant to be used only if the accessible name cannot provide an adequate braille representation, i.e., when a specialized braille description is very different from a text description converted to Braille. It is very important to note that when using aria-braillelabel
, authors are solely responsible for localizing the attribute value so that it aligns with the document language. In addition, authors need to design a way to clearly communicate the use of this attribute to the user. For example, this could be done in the product documentation. This is even more important when the value consists of Unicode Braille Patterns because Assistive Technologies will pass such content directly to the user without applying user specific braille translations; in general, authors are strongly discouraged from using Unicode Braille Patterns in aria-braillelabel
.
Assistive technologies SHOULD use the value of aria-braillelabel
when presenting the accessible name of an element in Braille, but SHOULD NOT change other functionality. For example, an assistive technology that provides aural rendering SHOULD use the accessible name.
Assistive technologies SHOULD expose the aria-braillelabel
property as follows:
aria-braillelabel
does not contain characters in Unicode Braille Patterns, translate the value according to the user's preferred translation table.The following example shows the use of aria-braillelabel
to customize a button's name in braille output.
<button aria-braillelabel="****">
<img alt="4 stars" src="images/stars.jpg">
</button>
In the previous example, a braille display would display "btn ****" in Braille rather than the verbose "btn gra 4 stars".
Characteristics: Characteristic Value Used in Roles: All elements of the base markup except for the following roles:caption
, code
, definition
, deletion
, emphasis
, generic
, insertion
, mark
, none
, paragraph
, strong
, subscript
, suggestion
, superscript
, term
, time
Value: string aria-brailleroledescription
property
Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. See related aria-roledescription
.
Some assistive technologies, such as screen readers, present the role of an element as part of the user experience. Such assistive technologies typically localize the name of the role, and they might customize it as well. Users of these assistive technologies depend on the presentation of the role name, such as "region," "button," or "slider," for an understanding of the purpose of the element and, if it is a widget, how to interact with it.
The aria-brailleroledescription
property gives authors the ability to override how assistive technologies localize and express the name of a role in Braille. Thus inappropriately using aria-brailleroledescription
might inhibit users' ability to understand or interact with an element on braille interfaces. Authors SHOULD limit use of aria-brailleroledescription
to clarifying the purpose of non-interactive container roles like group
or region
, or to providing a more specific description of a widget
in a braille context.
Authors MUST NOT use aria-brailleroledescription
without providing aria-roledescription
. Additionally, as with aria-roledescription
, authors MUST NOT specify aria-brailleroledescription
on an element which has an explicit or implicit WAI-ARIA role where aria-brailleroledescription
is prohibited.
In general, aria-brailleroledescription
is only meant to be used in rare cases when a aria-roledescription
is excessively verbose when rendered in Braille.
When using aria-brailleroledescription
, authors SHOULD also ensure that:
aria-brailleroledescription
is applied has a valid WAI-ARIA role or has an implicit WAI-ARIA role semantic.aria-brailleroledescription
is not empty or does not contain only whitespace characters.aria-brailleroledescription
does not contain any characters in Unicode Braille Patterns or consists of only characters in Unicode Braille Patterns; the value does not only contain Braille Pattern dots-0.aria-brailleroledescription
should not be identical to the element's WAI-ARIA aria-roledescription
, WAI-ARIA role
or implicit WAI-ARIA role semantic.Note
Note that Assistive Technologies with braille support can convert aria-roledescription
content to Braille. In addition, assistive technologies will be able to customize such braille output according to user preferences. Using only aria-roledescription
is almost always the better user experience and authors are strongly discouraged from using aria-brailleroledescription
to replicate aria-roledescription
. Instead, aria-brailleroledescription
is meant to be used only when aria-roledescription
cannot provide an adequate braille representation, i.e., when a specialized braille description is very different from a text description converted to Braille. It is very important to note that when using aria-brailleroledescription
, authors are solely responsible for localizing the attribute value so that it aligns with the document language. In addition, authors need to design a way to clearly communicate the use of this attribute to the user. For example, this could be done in the product documentation. This is even more important when the value consists of Unicode Braille Patterns because Assistive Technologies will pass such content directly to the user without applying user specific braille translations; in general, authors are strongly discouraged from using Unicode Braille Patterns in aria-brailleroledescription
.
User agents MUST NOT expose the aria-brailleroledescription
property if any of the following conditions exist:
aria-brailleroledescription
is empty or contains only whitespace characters, which includes standard whitespace and the empty Braille pattern: dots-0 (U+2800).aria-brailleroledescription
is applied has an explicit or implicit WAI-ARIA role where aria-brailleroledescription
is prohibited.aria-brailleroledescription
is applied does not have a valid WAI-ARIA aria-roledescription
.Assistive technologies SHOULD use the value of aria-brailleroledescription
when presenting the role of an element in Braille, but SHOULD NOT change other functionality based on the role of an element that has a value for aria-brailleroledescription
. For example, an assistive technology that provides functions for navigating to the next region
or button
SHOULD allow those functions to navigate to regions and buttons that have an aria-brailleroledescription
.
Assistive technologies SHOULD expose the aria-brailleroledescription
property as follows:
aria-brailleroledescription
does not contain characters in Unicode Braille Patterns, translate the value according to the user's preferred translation table.The following two examples show the use of aria-brailleroledescription
to abbreviate the role of a repeated non-interactive "slide" container in a web-based presentation application.
<div role="article" aria-roledescription="slide" aria-brailleroledescription="sld" id="slide" aria-labelledby="slideheading">
<h1 id="slideheading">Quarterly Report</h1>
</div>
<article aria-roledescription="slide" aria-brailleroledescription="sld" id="slide" aria-labelledby="slideheading">
<h1 id="slideheading">Quarterly Report</h1>
</div>
In the previous examples, a braille screen reader user would read "sld Quarterly Report" rather than the more verbose "slide Quarterly Report."
Characteristics: Characteristic Value Used in Roles: All elements of the base markup except for the following roles:generic
Value: string aria-busy
state
Indicates an element is being modified and that assistive technologies could wait until the modifications are complete before exposing them to the user.
The default value of aria-busy
is false
for all elements. When aria-busy
is true
for an element, assistive technologies can ignore changes to content that is an accessibility descendant that element and then process all changes made during the busy period as a single, atomic update when aria-busy
becomes false
.
If it is necessary to make multiple additions, modifications, or removals within a container element that is already either partially or fully rendered, authors MAY set aria-busy
to true
on the container element before the first change, and then set it to false
when the last change is complete. For example, if multiple changes to a live region should be spoken as a single unit of speech, authors MAY set aria-busy
to true
while the changes are being made and then set it to false
when the changes are complete and ready to be spoken.
If an element with role feed
is marked busy, assistive technologies might defer rendering changes that occur inside the feed
with the exception of user-initiated changes that occur inside the article
that the user is reading during the busy period.
If changes to a rendered widget
would create a state where the widget
is modifying Allowed Accessibility Child Roles during script execution, authors MAY set aria-busy
to true
on the widget
during the update process. For example, if a rendered tree grid required a set of simultaneous updates to multiple discontiguous branches, an alternative to replacing the complete tree element with a single update would be to mark the tree busy while each of the branches are modified.
aria-checked
state Values: Value Description false The element supports being checked but is not currently checked. mixed Indicates a mixed mode value for a tri-state checkbox or menuitemcheckbox. true The element is checked. undefined (default) The element does not support being checked. aria-colcount
property
Defines the total number of columns in a table
, grid
, or treegrid
. See related aria-colindex
.
If all of the columns are present in the DOM, it is not necessary to set this attribute as the user agent can automatically calculate the total number of columns. However, if only a portion of the columns is present in the DOM at a given moment, this attribute is needed to provide an explicit indication of the number of columns in the full table.
Authors MUST set the value of aria-colcount
to an integer equal to the number of columns in the full table. If the total number of columns is unknown, authors MUST set the value of aria-colcount
to -1
to indicate that the value should not be calculated by the user agent.
The following example shows a grid with 16 columns, of which columns 2, 3, 4, and 9 are displayed to the user.
<div role="grid" aria-colcount="16">
<div role="rowgroup">
<div role="row">
<span role="columnheader" aria-colindex="2">First Name</span>
<span role="columnheader" aria-colindex="3">Last Name</span>
<span role="columnheader" aria-colindex="4">Company</span>
<span role="columnheader" aria-colindex="9">Phone</span>
</div>
</div>
<div role="rowgroup">
<div role="row">
<span role="gridcell" aria-colindex="2">Fred</span>
<span role="gridcell" aria-colindex="3">Jackson</span>
<span role="gridcell" aria-colindex="4">Acme, Inc.</span>
<span role="gridcell" aria-colindex="9">555-1234</span>
</div>
<div role="row">
<span role="gridcell" aria-colindex="2">Sara</span>
<span role="gridcell" aria-colindex="3">James</span>
<span role="gridcell" aria-colindex="4">Acme, Inc.</span>
<span role="gridcell" aria-colindex="9">555-1235</span>
</div>
…
</div>
</div>
aria-colindex
property
Defines an element's column index or position with respect to the total number of columns within a table
, grid
, or treegrid
. See related aria-colindextext
, aria-colcount
, and aria-colspan
.
If all of the columns are present in the DOM, it is not necessary to set this attribute as the user agent can automatically calculate the column index of each cell or gridcell
. However, if only a portion of the columns is present in the DOM at a given moment, this attribute is needed to provide an explicit indication of the column of each cell or gridcell with respect to the full table.
Authors MUST set the value for aria-colindex
to an integer greater than or equal to 1, greater than the aria-colindex
value of any previous elements within the same row, and less than or equal to the number of columns in the full table. For a cell or gridcell which spans multiple columns, authors MUST set the value of aria-colindex
to the start of the span.
If the set of columns which is present in the DOM is contiguous, and if there are no cells which span more than one row or column in that set, then authors MAY place aria-colindex
on each row, setting the value to the index of the first column of the set. Otherwise, authors SHOULD place aria-colindex
on all of the accessibility children of each row.
The following example shows a grid with 16 columns, of which columns 2 through 5 are displayed to the user. Because the set of columns is contiguous, aria-colindex
can be placed on each row.
<div role="grid" aria-colcount="16">
<div role="rowgroup">
<div role="row" aria-colindex="2">
<span role="columnheader">First Name</span>
<span role="columnheader">Last Name</span>
<span role="columnheader">Company</span>
<span role="columnheader">Address</span>
</div>
</div>
<div role="rowgroup">
<div role="row" aria-colindex="2">
<span role="gridcell">Fred</span>
<span role="gridcell">Jackson</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">123 Broad St.</span>
</div>
<div role="row" aria-colindex="2">
<span role="gridcell">Sara</span>
<span role="gridcell">James</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">123 Broad St.</span>
</div>
…
</div>
</div>
The following example shows a grid with 16 columns, of which columns 2 through 5 are displayed to the user. While the set of columns is contiguous, some of the cells span multiple rows. As a result, aria-colindex
needs to be placed on all of the accessibility children of each row.
<div role="grid" aria-colcount="16">
<div role="rowgroup">
<div role="row">
<span role="columnheader" aria-colindex="2">First Name</span>
<span role="columnheader" aria-colindex="3">Last Name</span>
<span role="columnheader" aria-colindex="4">Company</span>
<span role="columnheader" aria-colindex="5">Address</span>
</div>
</div>
<div role="rowgroup">
<div role="row">
<span role="gridcell" aria-colindex="2">Fred</span>
<span role="gridcell" aria-colindex="3">Jackson</span>
<span role="gridcell" aria-colindex="4" aria-rowspan="2">Acme, Inc.</span>
<span role="gridcell" aria-colindex="5" aria-rowspan="2">123 Broad St.</span>
</div>
<div role="row">
<span role="gridcell" aria-colindex="2">Sara</span>
<span role="gridcell" aria-colindex="3">James</span>
</div>
…
</div>
</div>
The following example shows a grid with 16 columns, of which columns 2, 3, 4, and 9 are displayed to the user. Because the set of columns is non-contiguous, aria-colindex
needs to be placed on all of the accessibility children of each row.
<div role="grid" aria-colcount="16">
<div role="rowgroup">
<div role="row">
<span role="columnheader" aria-colindex="2">First Name</span>
<span role="columnheader" aria-colindex="3">Last Name</span>
<span role="columnheader" aria-colindex="4">Company</span>
<span role="columnheader" aria-colindex="9">Phone</span>
</div>
</div>
<div role="rowgroup">
<div role="row">
<span role="gridcell" aria-colindex="2">Fred</span>
<span role="gridcell" aria-colindex="3">Jackson</span>
<span role="gridcell" aria-colindex="4">Acme, Inc.</span>
<span role="gridcell" aria-colindex="9">555-1234</span>
</div>
<div role="row">
<span role="gridcell" aria-colindex="2">Sara</span>
<span role="gridcell" aria-colindex="3">James</span>
<span role="gridcell" aria-colindex="4">Acme, Inc.</span>
<span role="gridcell" aria-colindex="9">555-1235</span>
</div>
…
</div>
</div>
aria-colindextext
property
Defines a human readable text alternative of aria-colindex
. See related aria-rowindextext
.
Authors SHOULD only use aria-colindextext
when the provided or calculated value of aria-colindex
is not meaningful or does not reflect the displayed index, as is the case with spreadsheets and chess boards.
Authors SHOULD NOT use aria-colindextext
as a replacement for aria-colindex
because some assistive technologies rely upon the numeric column index for the purpose of keeping track of the user's position or providing alternative table navigation.
Note
Unlike aria-colindex
, aria-colindextext
is not a supported property of row
because user agents have no way to reliably calculate aria-colindextext
for the purpose of exposing its value on the cell
or gridcell
.
aria-colspan
property
Defines the number of columns spanned by a cell or gridcell within a table
, grid
, or treegrid
. See related aria-colindex
and aria-rowspan
.
This attribute is intended for cells and gridcells which are not contained in a native table. When defining the column span of cells or gridcells in a native table, authors SHOULD use the host language's attribute instead of aria-colspan
. If aria-colspan
is used on an element for which the host language provides an equivalent attribute, user agents MUST ignore the value of aria-colspan
and instead expose the value of the host language's attribute to assistive technologies.
Authors MUST set the value of aria-colspan
to an integer greater than or equal to 1 and less than the value which would cause the cell or gridcell to overlap the next cell or gridcell in the same row.
aria-controls
property
Identifies the element (or elements) whose contents or presence are controlled by the focused element or composite widget. See related aria-details
and aria-owns
.
The aria-controls
property is for referencing elements that are modified by the user interacting with the currently focused element or composite widget. The presence of aria-controls
enables assistive technologies to programmatically associate the currently focused element with the element or elements it controls. For instance, it can be used to inform users that by interacting with the controlling element they have revealed an element or elements that were previously in the hidden state. Or, by interacting with an element, they caused the selection or value of a controlled element to change.
Instance where an aria-controls
association could be made:
Additionally, the aria-controls
property supports multiple ID references. For example, a control can be used to highlight different instances of spelling errors. A user agent MAY convey to a user that there are a number of related controlled elements (the misspellings), allow the user to navigate to the controlled elements in sequence, or both.
aria-current
state
Indicates the element that represents the current item within a container or set of related elements.
The aria-current
attribute is a token type. Any value not included in the list of allowed values SHOULD be treated by assistive technologies as if the value true
had been provided. If the attribute is not present or its value is the empty string or undefined
, the default value of false
applies and the aria-current
state MUST NOT be exposed by user agents or assistive technologies.
The aria-current
attribute is used when an element within a set of related elements is visually styled to indicate it is the current item in the set. For example:
page
token used to indicate a page within a set of pages, where the element is visually styled to represent the current page.step
token used to indicate a step within a step-based process, where the element is visually styled to represent the current step.location
token used to indicate the element that is visually styled as the current component, such as within a flow chart.date
token used to indicate the current date within a calendar or other date collection.time
token used to indicate the current time within a timetable or other time collection.Authors SHOULD only mark one element in a set of elements as current with aria-current
.
Authors SHOULD NOT use the aria-current
attribute as a substitute for aria-selected
in widgets where aria-selected
has the same meaning. For example, in a tablist
, aria-selected
is used on a tab
to indicate the currently-displayed tabpanel
.
Note
In some use cases for widgets that support aria-selected
, current and selected can have different meanings and can both be used within the same set of elements. For example, aria-current="page"
can be used in a navigation tree
to indicate which page is currently displayed, while aria-selected="true"
indicates which page will be displayed if the user activates the treeitem
. Furthermore, the same tree can support operating on one or more selected pages (treeitems) by way of a context menu containing options such as "delete" and "move."
aria-describedby
property
Identifies the element (or elements) that describes the object. See related aria-labelledby
and aria-description
.
The aria-labelledby
attribute is similar to aria-describedby
in that both reference other elements to calculate a text alternative (an accessible name, and description, respectively). While a concise accessible name is preferable, a description can either be concise, or provide more verbose information.
The element or elements referenced by the aria-describedby comprise the entire description. Include ID references to multiple elements if necessary, or enclose a set of elements (e.g., paragraphs) with the element referenced by the ID.
Characteristics: Characteristic Value Used in Roles: All elements of the base markup Value: ID reference listaria-description
property
Defines a string value that describes or annotates the current element. See related aria-describedby
.
The aria-description
attribute is similar to aria-label
in that both provide a flat string to associate with the element (an accessible description, and name, respectively). Unlike an accessible name, which is generally preferred to be concise, a description can provide more verbose information, as necessary.
The purpose of aria-description
is the same as that of aria-describedby
. It provides the user with additional descriptive text for the object. The most common accessibility API mapping for a description is the accessible description property. User agents MUST give precedence to aria-describedby
over aria-description
when computing the accessible description property.
In cases where providing a visible description is not the desired user experience, authors MAY set the accessible description of the element using aria-description
. However, if the description text is available in the DOM, authors SHOULD NOT use aria-description
, but should use one of the following instead:
aria-describedby
when the related description or annotation elements contain a simple, small description that is best experienced as a flat string, rather than by having the user navigate to them.aria-details
when the related description or annotation elements contain useful semantics or structure, or there is a lot of content within them, making it difficult to experience as a flat string. Using aria-details
will allow assistive technology users to visit the structured content and provide additional navigation commands, making it easier to understand the structure, or to experience the information in smaller pieces.aria-details
property
Identifies the element (or elements) that provide additional information related to the object. See related aria-describedby
.
The aria-details
property is for referencing elements that provide more detailed information than would normally be provided via aria-describedby
. The presence of aria-details
enables assistive technologies to make users aware of the availability of extended information and navigate to it. Authors SHOULD ensure that elements referenced by aria-details
are visible to all users.
Assistive technologies can use the role of elements referenced by the aria-details
property to help users understand the types of information associated with the element. Authors MAY convey the type of details associated with an element as follows:
aria-details
refers to an element with role comment
.aria-details
is applied to an element with role term
and refers to an element with role definition
.aria-details
is applied to an element with role figure
and refers to an element with role caption
, or an element within a caption
.aria-details
refers to an element with role doc-footnote
. This role is defined in [DPUB-ARIA-1.0].aria-details
refers to an element with role doc-endnote
. This role is defined in [DPUB-ARIA-1.0].aria-details
refers to an element with any other role.Unlike elements referenced by aria-describedby
, elements referenced by aria-details
are not used in the Accessible Description Computation as defined in the Accessible Name and Description Computation [ACCNAME-1.2]. Thus, the content of elements referenced by aria-details
are not flattened to a string when presented to assistive technology users. This makes aria-details
particularly useful when converting the information to a string would cause a loss of information or make the extended information more difficult to understand.
The aria-details
property supports referring to multiple elements. For example, a paragraph in a document editor might reference multiple comments that are not related to each other. If a user agent relies on an accessibility API that does not support exposing multiple descriptive relations, the user agent SHOULD expose the relationship to the first element referenced by aria-details
.
It is valid for an element to have both aria-details
and a description specified with either aria-describedby
or aria-description
. If a user agent relies on an accessibility API that does not support exposing multiple descriptive relations, and if an element has both aria-details
and aria-describedby
, the user agent SHOULD expose the aria-details
relation and the description string computed from the aria-describedby
relationship.
A common use for aria-details
is in digital publishing where an extended description needs to be conveyed in a book that requires structural markup or the embedding of other technology to provide illustrative content. The following example demonstrates this scenario.
<img src="pythagorean.jpg" alt="Pythagorean Theorem" aria-details="det">
<details id="det">
<summary>Example</summary>
<p>
The Pythagorean Theorem is a relationship in Euclidean Geometry between the three sides of
a right triangle, where the square of the hypotenuse is the sum of the squares of the two
opposing sides.
</p>
<p>
The following drawing illustrates an application of the Pythagorean Theorem when used to
construct a skateboard ramp.
</p>
<object data="skatebd-ramp.svg" type="image/svg+xml"></object>
<p>
In this example you will notice a skateboard ramp with a base and vertical board whose width
is the width of the ramp. To compute how long the ramp must be, simply calculate the
base length, square it, sum it with the square of the height of the ramp, and take the
square root of the sum.
</p>
</details>
Alternatively, aria-details
can refer to a link to a web page having the extended description, as shown in the following example.
<img src="pythagorean.jpg" alt="Pythagorean Theorem" aria-details="det">
<p>
See an <a href="https://example.com/pt.html" id="det">Application of the Pythagorean Theorem</a>.
</p>
Characteristics: Characteristic Value Used in Roles: All elements of the base markup Value: ID reference list aria-disabled
state
Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. See related aria-hidden
and aria-readonly
.
For example, irrelevant options in a radio group can be disabled. Disabled elements might not receive focus from the tab order. For some disabled elements, applications might choose not to support navigation to descendants. In addition to setting the aria-disabled
attribute, authors SHOULD change the appearance (grayed out, etc.) to indicate that the item has been disabled.
The state of being disabled applies to the element with aria-disabled and all focusable descendant elements of the element on which the aria-disabled
attribute is applied.
Note
While aria-disabled
and proper scripting can successfully disable an element with role link
, fully disabling a host language equivalent can be problematic. Authors are advised not to use aria-disabled
on elements that cannot be disabled through features of the host language alone.
Note: Usage on columnheader, rowheader and row
While aria-disabled
is currently supported on columnheader
, rowheader
, and row
, in a future version the working group plans to prohibit its use on elements with any of those three roles except when they are in the context of a grid
or treegrid
.
Note
This state is being deprecated as a global state in ARIA 1.2. In future versions it will only be allowed on roles where it is specifically supported.
Values: Value Description false (default) The element is enabled. true The element and all focusable descendants are disabled and its value cannot be changed by the user.aria-dropeffect
property
[Deprecated in ARIA 1.1] Indicates what functions can be performed when a dragged object is released on the drop target.
Note
The aria-dropeffect
property is expected to be replaced by a new feature in a future version of WAI-ARIA. Authors are therefore advised to treat aria-dropeffect
as deprecated.
This property allows assistive technologies to convey the possible drag options available to users, including whether a pop-up menu of choices is provided by the application. Typically, drop effect functions can only be provided once an object has been grabbed for a drag operation as the drop effect functions available are dependent on the object being dragged.
More than one drop effect can be supported for a given element. Therefore, the value of this attribute is a space-separated set of tokens indicating the possible effects, or none
if there is no supported operation. In addition to setting the aria-dropeffect
attribute, authors SHOULD show a visual indication of potential drop targets.
aria-errormessage
property
Identifies the element (or elements) that provides an error message for an object. See related aria-invalid
and aria-describedby
.
The aria-errormessage
attribute references other elements that contain error message text. Authors MUST use aria-invalid
in conjunction with aria-errormessage
.
When the value of an object is not valid, aria-invalid
is set to true
, which indicates that the message contained by elements referenced by aria-errormessage
is pertinent.
When an object is in a valid state, it has either aria-invalid
set to false
or it does not have the aria-invalid
attribute. Authors MAY use aria-errormessage
on an object that is currently valid, but only if the elements referenced by aria-errormessage
are hidden from all users, because the message they contain is not pertinent.
When aria-errormessage
is pertinent, authors MUST ensure the content is not hidden from all users so users can navigate to and examine the error message. Similarly, when aria-errormessage
is not pertinent, authors MUST either ensure the content is hidden from all users or remove the aria-errormessage
attribute or its value.
User agents MUST NOT expose aria-errormessage
for an object with an aria-invalid
value of false
.
Authors MAY call attention to a new error message with a live region by modifying inserting the error message into the contents of a existing, rendered element with a live region role, such as alert
. A live region notification is appropriate when an error message is displayed to users after they have provided an invalid value.
A typical message describes what is wrong and informs users what is required. For example, an error message might be, Invalid time: the time must be between 9:00 AM and 5:00 PM.
The following example code shows markup for an initial valid state and for a subsequent invalid state. Note the changes to aria-invalid
on the text input object, and to aria-live
on the element containing the text of the error message:
<label for="startTime"> Please enter a start time for the meeting: </label>
<input id="startTime" type="text" aria-errormessage="msgID" value="" aria-invalid="false">
<span id="msgID" role="alert"></span>
<label for="startTime"> Please enter a start time for the meeting: </label>
<input id="startTime" type="text" aria-errormessage="msgID" aria-invalid="true" value="11:30 PM" >
<span id="msgID" role="alert">Invalid time: the time must be between 9:00 AM and 5:00 PM</span>
Note
This example uses role="alert"
(which includes an implicit value of aria-live="assertive"
) to indicate that assistive technologies will immediately announce the error message rather than completing other queued announcements first. This increases the likelihood that users are aware of the error message before they move focus out of the input.
Note
This state has been deprecated as a global state in ARIA 1.2. It is only supported on live region roles.
aria-expanded
state
Indicates whether a related element is expanded (shown) or collapsed (hidden).
The aria-expanded
attribute is applied to a focusable, interactive element that toggles visibility of content of a different element. If the element with aria-expanded
is also a treeitem
in a tree
or a row
in a treegrid
, then the author SHOULD ensure the element is also the accessibility parent of the content it expands and collapses. Otherwise, the author SHOULD ensure the element with aria-expanded
is not the accessibility parent of the content that is expanding or collapsing. Rather, identify that relationship between the interactive element and the element being controlled using aria-controls
.
For example, aria-expanded
is applied to a parent treeitem
to indicate whether its child branch of the tree is shown.
<ul role="tree">
<li role="treeitem" aria-expanded="false" aria-selected="false">
<span>Fruits</span>
<ul role="group" hidden>
<li role="treeitem" aria-selected="false">Apricot</li>
<li role="treeitem" aria-selected="false">Mangosteen</li>
<li role="treeitem" aria-selected="false">Yuzu</li>
</ul>
</li>
</ul>
Similarly, it can be applied to a button
to control the visibility of another element and its content on the current page.
<button type="button" aria-controls="mangosteen" aria-expanded="false">Mangosteen</button>
<div id="mangosteen" hidden>
An edible fruit native to tropical lands surrounding the Indian Ocean.
</div>
Values: Value Description false The grouping element this element controls or is the accessibility parent of is collapsed. true The grouping element this element controls or is the accessibility parent of is expanded. undefined (default) The element does not own or control a grouping element that is expandable. aria-flowto
property
Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order.
When aria-flowto
has a single ID reference, it allows assistive technologies to, at the user's request, forego normal document reading order and go to the targeted object. However, when aria-flowto
is provided with multiple ID references, assistive technologies SHOULD present the referenced elements as path choices.
In the case of one or more ID references, user agents or assistive technologies SHOULD give the user the option of navigating to any of the targeted elements. The name of the path can be determined by the name of the target element of the aria-flowto
attribute. Accessibility APIs can provide named path relationships.
aria-grabbed
state
[Deprecated in ARIA 1.1] Indicates an element's "grabbed" state in a drag-and-drop operation.
Note
The aria-grabbed
state is expected to be replaced by a new feature in a future version of WAI-ARIA. Authors are therefore advised to treat aria-grabbed
as deprecated.
Setting aria-grabbed
to true
indicates that the element has been selected for dragging. Setting aria-grabbed
to false
indicates that the element can be grabbed for a drag-and-drop operation, but is not currently grabbed. If aria-grabbed
is unspecified or set to undefined
(default), the element cannot be grabbed.
When aria-grabbed
is set to true
, authors SHOULD update the aria-dropeffect
attribute of all potential drop targets. When an element is not grabbed (the value is set to false
or undefined
, or the attribute is removed), authors SHOULD revert the aria-dropeffect
attributes of the associated drop targets to none
.
aria-hidden
state Characteristics: Characteristic Value Used in Roles: All elements of the base markup Value: true/false/undefined Values: Value Description false The element's hidden state is determined by the user agent based on whether it is rendered. Synonym of undefined
. true The element is hidden from the accessibility API. undefined (default) The element's hidden state is determined by the user agent based on whether it is rendered. aria-invalid
state
Indicates the entered value does not conform to the format expected by the application. See related aria-errormessage
.
If the value is computed to be invalid or out-of-range, the author SHOULD set this attribute to true
. user agents SHOULD inform the user of the error. Authors SHOULD provide suggestions for corrections if they are known.
When the user attempts to submit data involving a field for which aria-required
is true
, authors MAY use the aria-invalid
attribute to signal there is an error. However, if the user has not attempted to submit the form, authors SHOULD NOT set the aria-invalid
attribute on required widgets simply because the user has not yet entered data.
For future expansion, the aria-invalid
attribute is a token type. Any value not recognized in the list of allowed values MUST be treated by user agents as if the value true
had been provided. If the attribute is not present, or its value is false
, or its value is the empty string, the default value of false
applies.
Note
This state is being deprecated as a global state in ARIA 1.2. In future versions it will only be allowed on roles where it is specifically supported.
Values: Value Description grammar A grammatical error was detected. false (default) There are no detected errors in the value. spelling A spelling error was detected. true The value entered by the user has failed validation.aria-keyshortcuts
property
Defines keyboard shortcuts that an author has implemented to activate or give focus to an element.
The value of the aria-keyshortcuts
attribute is a space-separated list of keyboard shortcuts that can be pressed to activate a command or textbox widget. The keys defined in the shortcuts represent the physical keys pressed and not the actual characters generated. Each keyboard shortcut consists of one or more tokens delimited by the plus sign ("+") representing zero or more modifier keys and exactly one non-modifier key that must be pressed simultaneously to activate the given shortcut.
Authors MUST specify modifier keys exactly according to the UI Events KeyboardEvent key Values spec [uievents-key] - for example, "Alt", "Control", "Shift", "Meta", or "AltGraph". Note that Meta corresponds to the Command key, and Alt to the Option key, on Apple computers.
The valid names for non-modifier keys are any printable character such as "A", "B", "1", "2", "$", "Plus" for a plus sign, "Space" for the spacebar, or the names of any other non-modifier key specified in the UI Events KeyboardEvent key Values spec [uievents-key] - for example, "Enter", "Tab", "ArrowRight", "PageDown", "Escape", or "F1". The use of "Space" for the spacebar is an exception to the UI Events KeyboardEvent key Values spec [uievents-key] as the space or spacebar key is encoded as ' '
and would be treated as a whitespace character.
Authors MUST ensure modifier keys come first when they are part of a keyboard shortcut. Authors MUST ensure that required non-modifier keys come last when they are part of a shortcut. The order of the modifier keys is not otherwise significant, so "Alt+Shift+T" and "Shift+Alt+T" are equivalent, but "T+Shift+Alt" is not valid because all of the modifier keys don't come first, and "Alt" is not valid because it doesn't include at least one non-modifier key.
When specifying an alphabetic key, both the uppercase and lowercase variants are considered equivalent: "a" and "A" are the same.
When implementing keyboard shortcuts authors should consider the keyboards they intend to support to avoid unintended results. Keyboard designs vary significantly based on the device used and the languages supported. For example, many modifier keys are used in conjunction with other keys to create common punctuation symbols, create number characters, swap keyboard sides on bilingual keyboards to switch languages, and perform a number of other functions.
For many supported keyboards, authors can prevent conflicts by avoiding keys other than ASCII letters, as number characters and common punctuation often require modifiers. Here, the keyboard shortcut entered does not equate to the key generated. For example, in French keyboard layouts, the number characters are not available until you press the Shift key, so a keyboard shortcut defined as "Shift+2" would be ambiguous as this is how one would type the "2" character on a French keyboard.
If the character used is determined by a modifier key, the author MUST specify the actual key used to generate the character, that is generated by the key, and not the resulting character. This convention enables the assistive technology to accurately convey what keys must be used to generate the shortcut. For example, on most U.S. English keyboards, the percent sign "%" can be input by pressing Shift+5. The correct way to specify this shortcut is "Shift+5". It is incorrect to specify "%" or "Shift+%". However, note that on some international keyboards the percent sign might be an unmodified key, in which case "%" and "Shift+%" could be correct on those keyboards.
If the key that needs to be specified is illegal in the host language or would cause a string to be terminated, authors MUST use the string escaping sequence of the host language to specify it. For example, the single-quote character can be encoded as "'" in HTML.
Examples of valid keyboard shortcuts include:
User agents MUST NOT change keyboard behavior in response to the aria-keyshortcuts
attribute. Authors MUST handle scripted keyboard events to process aria-keyshortcuts
. The aria-keyshortcuts
attribute exposes the existence of these shortcuts so that assistive technologies can communicate this information to users.
Authors SHOULD provide a way to expose keyboard shortcuts so that all users can discover them, such as through the use of a tooltip. Authors MUST ensure that aria-keyshortcuts
applied to disabled elements are unavailable.
Authors SHOULD avoid implementing shortcut keys that inhibit operating system, user agent, or assistive technology functionality. This requires the author to carefully consider both which keys to assign and the contexts and conditions in which the keys are available to the user. For guidance, see the keyboard shortcuts section of the ARIA Authoring Practices Guide.
Authors SHOULD consider whether the keyboard shortcut will be valid in each language and physical keyboard layout, and consider localizing the shortcut in languages, locales, and common hardware keyboard configurations.
Characteristics: Characteristic Value Used in Roles: All elements of the base markup Value: stringaria-label
property
Defines a string value that labels the current element. See related aria-labelledby
.
The purpose of aria-label
is the same as that of aria-labelledby
. It provides the user with a recognizable name of the object. The most common accessibility API mapping for a label is the accessible name property.
Most host languages provide an attribute that could be used to name the element (e.g., the
attribute in HTML), yet this could present a browser tooltip. In the cases where DOM content or a tooltip is undesirable, authors MAY set the accessible name of the element using title
aria-label
, if the element does not prohibit use of the attribute. If the label text is available in the DOM (i.e., typically visible text content), authors SHOULD use aria-labelledby
and SHOULD NOT use aria-label
. There might be instances where the name of an element cannot be determined programmatically from the DOM, and there are cases where referencing DOM content is not the desired user experience. Authors MUST NOT specify aria-label
on an element which has an explicit or implicit WAI-ARIA role where aria-label
is prohibited. As required by the Accessible Name and Description Computation [ACCNAME-1.2], user agents give precedence to aria-labelledby
over aria-label
when computing the accessible name property.
caption
, code
, definition
, deletion
, emphasis
, generic
, insertion
, mark
, none
, paragraph
, strong
, subscript
, suggestion
, superscript
, term
, time
Value: string aria-labelledby
property
Identifies the element (or elements) that labels the current element. See related aria-label
and aria-describedby
.
The purpose of aria-labelledby
is the same as that of aria-label
. It provides the user with a recognizable name of the object. The most common accessibility API mapping for a label is the accessible name property.
If the interface is such that it is not possible to have a visible label on the screen, authors SHOULD use aria-label
and SHOULD NOT use aria-labelledby
. Authors MUST NOT specify aria-labelledby
on an element which has an explicit or implicit WAI-ARIA role where aria-labelledby
is prohibited. As required by the Accessible Name and Description Computation [ACCNAME-1.2], user agents give precedence to aria-labelledby
over aria-label
when computing the accessible name property.
The aria-labelledby
attribute is similar to aria-describedby
in that both reference other elements to calculate a text alternative (an accessible name, and description, respectively). While a concise accessible name is preferable, a description can either be concise, or provide more verbose information.
Note
The expected spelling of this property in U.S. English is "labeledby." However, the accessibility API features to which this property is mapped have established the "labelledby" spelling. This property is spelled that way to match the convention and minimize the difficulty for developers.
Characteristics: Characteristic Value Used in Roles: All elements of the base markup except for the following roles:caption
, code
, definition
, deletion
, emphasis
, generic
, insertion
, mark
, none
, paragraph
, strong
, subscript
, suggestion
, superscript
, term
, time
Value: ID reference list aria-level
property
Defines the hierarchical level of an element within a structure.
This can be applied inside trees to tree items, to headings inside a document, to nested grids, nested tablists and to other structural items that might appear inside a container or participate in an ownership hierarchy. The value for aria-level
is an integer greater than or equal to 1.
Levels increase with depth. If the DOM ancestry does not accurately represent the level, authors SHOULD explicitly define the aria-level
attribute.
This attribute is applied to elements that act as leaf nodes within the orientation of the set, for example, on elements with role treeitem
rather than elements with role group
. This means that multiple elements in a set can have the same value for this attribute. Although it would be less repetitive to provide a single value on the container, restricting this to leaf nodes ensures that there is a single way for assistive technologies to use the attribute.
If the DOM ancestry accurately represents the level, the user agent can calculate the level of an item from the document structure. This attribute can be used to provide an explicit indication of the level when that is not possible to calculate from the document structure or the aria-owns
attribute. User agent support for automatic calculation of level might vary; authors SHOULD test with user agents and assistive technologies to determine whether this attribute is needed. If the author intends for the user agent to calculate the level, the author SHOULD omit this attribute.
Note
In the case of a treegrid
, aria-level
is supported on elements with the role row
, not elements with role gridcell
. At first glance, this might seem inconsistent with the application of aria-level
on treeitem
elements, but it is consistent in that the row
acts as the leaf node within the vertical orientation of the grid
, whereas the gridcell
is a leaf node within the horizontal orientation of each row
. Level is not supported on sets of cells within rows, so the aria-level
attribute is applied to the element with the role row
.
Note
On elements with role heading
, values for aria-level
above 6 can create difficulties for users. Also, at the time of this writing, most combinations of user agents and assistive technologies only support aria-level
integers 1-9 on headings.
aria-live
property
Indicates that an element will be updated or modified, and defines the priority of updates the user agents, assistive technologies, and user can expect from the live region.
The values of this attribute are expressed in degrees of importance. When regions are specified as polite
, assistive technologies will notify users of updates but generally do not interrupt the current task, and updates take low priority. When regions are specified as assertive
, assistive technologies will immediately notify the user of relevant modifications to the live region, and could potentially clear the speech queue of previous updates.
Priority levels (none
, polite
, assertive
) act as an ordering mechanism for updates and serve as a recommendation to user agents or assistive technologies. The value can be overridden by user agents, assistive technologies, or the user. For example, if assistive technologies can determine that a change occurred in response to a key press or a mouse click, the assistive technologies might present that change immediately even if the value of the aria-live
attribute states otherwise.
Since different users have different needs, it is up to the user to tweak their assistive technologies' response to a live region. Assistive technologies might choose to implement increasing and decreasing levels of granularity so that the user can exercise control over queues and interruptions.
When the property is not set on an object that needs to send updates, the priority level is the value of the nearest ancestor that sets the aria-live
attribute.
The aria-live
attribute is the primary determination for the order of presentation of changes to live regions. Implementations will also consider the default level of priority in a role when the aria-live
attribute is not set in the ancestor chain (e.g., log
changes are polite
by default). Modifications to live regions which are assertive
will be presented immediately, followed by polite
items. User agents or assistive technologies can choose to clear queued changes when an assertive change occurs. (e.g., changes in an assertive region can remove all currently queued changes)
When live regions are marked as polite
, assistive technologies SHOULD announce updates at the next graceful opportunity, such as at the end of speaking the current sentence or when the user pauses typing. When live regions are marked as assertive
, assistive technologies SHOULD immediately notify the user of modifications to the live region. Because an interruption might disorient users or cause them to not complete their current task, authors SHOULD NOT use the assertive
value unless the interruption is imperative.
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.
aria-modal
property
Indicates whether an element is modal when displayed.
The aria-modal
attribute is used to indicate that the presence of a "modal" element precludes usage of other content on the page. For example, when a modal dialog is displayed, it is expected that the user's interaction is limited to the contents of the dialog, until the modal dialog loses focus or is no longer displayed.
When a modal element is displayed, assistive technologies SHOULD navigate to the element unless focus has explicitly been set elsewhere. Some assistive technologies limit navigation to the modal element's contents. If focus moves to an element outside the modal element, assistive technologies SHOULD NOT limit navigation to the modal element.
When a modal element is displayed, authors MUST ensure the interface can be controlled using only descendants of the modal element. In other words, if a modal dialog has a close button, the button should be a descendant of the dialog. When a modal element is displayed, authors SHOULD mark all other contents as inert (such as "inert subtrees" in HTML) if the ability to do so exists in the host language.
Values: Value Description false (default) Element is not modal. true Element is modal.aria-multiline
property
Indicates whether a text box accepts multiple lines of input or only a single line.
Note
In most user agent implementations, the default behavior of the ENTER or RETURN key is different between the single-line and multi-line text fields in HTML. When user has focus in a single-line <input type="text">
element, the keystroke usually submits the form. When user has focus in a multi-line <textarea>
element, the keystroke inserts a line break. The WAI-ARIA textbox
role differentiates these types of boxes with the aria-multiline
attribute, so authors are advised to be aware of this distinction when designing the field.
aria-multiselectable
property
Indicates that the user can select more than one item from the current selectable descendants.
Authors SHOULD ensure that selected descendants have the aria-selected
attribute set to true
, and selectable descendants that are not selected have the aria-selected
attribute set to false
. Authors SHOULD NOT use the aria-selected
attribute on descendants that are not selectable.
Note
Lists and trees are examples of roles that might allow users to select more than one item at a time.
Values: Value Description false (default) Only one item can be selected. true More than one item in the widget can be selected at a time.aria-orientation
property
Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
Note
In ARIA 1.1, the default value for aria-orientation
changed from horizontal
to undefined
. Implicit defaults are defined on some roles (e.g., slider
defaults to horizontal; scrollbar
defaults to vertical) but remain undefined on roles where an expected default orientation is ambiguous (e.g., radiogroup
).
aria-owns
property
Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. See related aria-controls
.
The value of the aria-owns
attribute is a space-separated ID reference list that references one or more elements in the document by ID. The reason for adding aria-owns
is to expose a parent/child contextual relationship to assistive technologies that is otherwise impossible to infer from the DOM.
If an element has both aria-owns
and DOM children then the order of the child elements with respect to the parent/child relationship is the DOM children first, then the elements referenced in aria-owns
. If the author intends that the DOM children are not first, then list the DOM children in aria-owns
in the desired order. Authors SHOULD NOT use aria-owns
as a replacement for the DOM hierarchy. If the relationship is represented in the DOM, do not use aria-owns
.
Authors MUST ensure that an element's ID is not specified in more than one other element's aria-owns
attribute at any time. In other words, an element can have only one explicit owner. Authors MUST NOT create circular references with aria-owns
. In the case of authoring error with aria-owns
, the user agent MAY ignore some aria-owns
element references in order to build a consistent model of the content.
Authors MUST NOT specify aria-owns
on an element which has Presentational Children.
aria-owns
is resolved in the order it is encountered in the DOM. Every element referenced by aria-owns
will determine its exposure to the accessibility tree after its change in ownership is resolved. However:
aria-owns
when it is set on an element that has been excluded from the accessibility tree.aria-owns
when it references an element that is, or has a DOM ancestor that is, hidden from all users.In the following example, “(opens in a new window)” is included in the accessibility tree by virtue of its changed ownership.
<a href="https://www.w3.org/" target="_blank" aria-owns="new-window-warning">
World Wide Web Consortium
</a>
<div aria-hidden="true">
<span id="new-window-warning"> (opens in a new window)</span>
</div>
In the following example, “(opens in a new window)” remains excluded from the accessibility tree since its DOM ancestor is hidden from all users in host language terms.
<a href="https://www.w3.org/" aria-owns="new-window-warning">
World Wide Web Consortium
</a>
<div hidden>
<span id="new-window-warning"> (opens in a new window)</span>
</div>
In the following example, <div id="instructions">
and its text content remain exposed and unmoved in the accessibility tree since the would-be accessibility parent element with aria-owns
is hidden from all users.
<div hidden aria-owns="instructions">
...
</div>
...
<div id="instructions">
Instructions go here...
</div>
Characteristics: Characteristic Value Used in Roles: All elements of the base markup Value: ID reference list aria-placeholder
property
Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format.
Authors SHOULD NOT use aria-placeholder
instead of a label as their purposes are different: The label indicates what kind of information is expected. The placeholder text is a hint about the expected value. See related aria-labelledby
and aria-label
.
Authors SHOULD present this hint to the user by displaying the hint text at any time the control's value is the empty string. This includes cases where the control first receives focus, and when users remove a previously-entered value.
Note
As is the case with the related
attribute in HTML, use of placeholder text as a replacement for a displayed label can reduce the accessibility and usability of the control for a range of users including older users and users with cognitive, mobility, fine motor skill or vision impairments. While the hint given by the control's label is shown at all times, the short hint given in the placeholder attribute is only shown before the user enters a value. Furthermore, placeholder text might be mistaken for a pre-filled value, and as commonly implemented the default color of the placeholder text provides insufficient contrast and the lack of a separate visible label reduces the size of the hit region available for setting focus on the control.placeholder
Note
The following examples do not use the HTML label
element as it cannot be used to label HTML elements with contenteditable
.
The following example shows a searchbox
in which the user has entered a value:
<span id="label">Birthday:</span>
<div contenteditable role="searchbox" aria-labelledby="label" aria-placeholder="MM-DD-YYYY">03-14-1879</div>
The following example shows the same searchbox
in which the user has not yet entered a value or has removed a previously-entered value:
<span id="label">Birthday:</span>
<div contenteditable role="searchbox" aria-labelledby="label" aria-placeholder="MM-DD-YYYY">MM-DD-YYYY</div>
aria-posinset
property
Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related aria-setsize
.
If all items in a set are present in the document structure, it is not necessary to set this attribute, as the user agent can automatically calculate the set size and position for each item. However, if only a portion of the set is present in the document structure at a given moment, this property is needed to provide an explicit indication of an element's position.
The following example shows items 5 through 8 in a set of 16.
<h2 id="label_fruit"> Available Fruit </h2>
<ul role="listbox" aria-labelledby="label_fruit">
<li role="option" aria-setsize="16" aria-posinset="5"> apples </li>
<li role="option" aria-setsize="16" aria-posinset="6"> bananas </li>
<li role="option" aria-setsize="16" aria-posinset="7"> cantaloupes </li>
<li role="option" aria-setsize="16" aria-posinset="8"> dates </li>
</ul>
When specifying aria-posinset
, authors MUST specify a value that is an integer greater than or equal to 1, and less than or equal to the size of the set when that size is known. If authors specify aria-posinset
, authors MUST also specify a value for aria-setsize
.
When specifying aria-posinset
on a menuitem
, menuitemcheckbox
, or menuitemradio
, authors SHOULD set the value of aria-posinset
with respect to the total number of items in the menu
, excluding any separators.
aria-pressed
state
Indicates the current "pressed" state of toggle buttons. See related aria-checked
and aria-selected
.
Toggle buttons require a full press-and-release cycle to change their value. Activating it once changes the value to true
, and activating it another time changes the value back to false
. A value of mixed
means that the values of more than one item controlled by the button do not all share the same value. If the attribute is not present, the button is not a toggle button.
The aria-pressed
attribute is similar but not identical to the aria-checked
attribute. Operating systems support pressed
on buttons and checked
on checkboxes.
aria-readonly
property
Indicates that the element is not editable, but is otherwise operable. See related aria-disabled
.
This means the user can read but not set the value of the widget. Readonly elements are relevant to the user, and authors SHOULD NOT restrict navigation to the element or its focusable descendants. Other actions such as copying the value of the element are also supported. This is in contrast to disabled elements, to which applications might not allow user navigation to descendants.
Examples include:
aria-relevant
property
Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. See related aria-atomic
.
The attribute is represented as a space-separated list of the following values: additions
, removals
, text
; or a single catch-all value all
.
This is used to describe semantically meaningful changes, as opposed to merely presentational ones. For example, nodes that are removed from the top of a log are merely removed for purposes of creating room for other entries, and the removal of them does not have meaning. However, in the case of a buddy list, removal of a buddy name indicates that they are no longer online, and this is a meaningful event. In that case aria-relevant
will be set to all
. When the aria-relevant
attribute is not provided, the default value, additions text
, indicates that text modifications and node additions are relevant, but that node removals are irrelevant.
Note
aria-relevant
values of removals or all are to be used sparingly. Assistive technologies only need to be informed of content removal when its removal represents an important change, such as a buddy leaving a chat room.
Note
Text removals should only be considered relevant if one of the specified values is 'removals' or 'all'. For example, for a text change from 'foo' to 'bar' in a live region with a default aria-relevant
value, the text addition ('bar') would be spoken, but the text removal ('foo') would not.
aria-relevant
is an optional attribute of live regions. This is a suggestion to assistive technologies, but assistive technologies are not required to present changes of all the relevant types.
When aria-relevant
is not defined, an element's value is inherited from the nearest ancestor with a defined value. Although the value is a token list, inherited values are not additive; the value provided on a descendant element completely overrides any inherited value from an ancestor element.
When text changes are denoted as relevant, user agents MUST monitor any descendant node change that affects the Accessible Name and Description Computation [ACCNAME-1.2] of the live region as if the accessible name were determined from contents (nameFrom: contents). For example, a text change would be triggered if the HTML alt
attribute of a contained image changed. However, no change would be triggered if there was a text change to a node outside the live region, even if that node was referenced (via aria-labelledby
) by an element contained in the live region.
aria-required
property
Indicates that user input is required on the element before a form can be submitted.
For example, if the user needs to fill in an address field, the author will need to set the field's aria-required
attribute to true
.
Unless an exactly equivalent native attribute is available, host languages SHOULD allow authors to use the aria-required
attribute on host language form elements that require input or selection by the user.
aria-roledescription
property
Defines a human-readable, author-localized description for the role of an element.
Some assistive technologies, such as screen readers, present the role of an element as part of the user experience. Such assistive technologies typically localize the name of the role, and they might customize it as well. Users of these assistive technologies depend on the presentation of the role name, such as "region," "button," or "slider," for an understanding of the purpose of the element and, if it is a widget, how to interact with it.
The aria-roledescription
property gives authors the ability to override how assistive technologies localize and express the name of a role. Thus inappropriately using aria-roledescription
might inhibit users' ability to understand or interact with an element. Authors SHOULD limit use of aria-roledescription
to clarifying the purpose of non-interactive container roles like group
or region
, or to providing a more specific description of a widget
.
When using aria-roledescription
, authors SHOULD also ensure that:
aria-roledescription
is applied has a valid WAI-ARIA role or has an implicit WAI-ARIA role semantic.aria-roledescription
is not empty or does not contain only whitespace characters.Note
Depending on the assistive technology, user verbosity settings, or other factors, certain elements' role descriptions might not be conveyed. If specifying aria-roledescription
on such elements, then the custom role descriptions might also not be conveyed by these assistive technologies.
Additionally, authors MUST NOT specify aria-roledescription
on an element which has an explicit or implicit WAI-ARIA role where aria-roledescription
is prohibited.
User agents MUST NOT expose the aria-roledescription
property if any of the following conditions exist:
aria-roledescription
is applied has an explicit or implicit WAI-ARIA role where aria-roledescription
is prohibited.aria-roledescription
is undefined or the empty string.Assistive technologies SHOULD use the value of aria-roledescription
when presenting the role of an element, but SHOULD NOT change other functionality based on the role of an element that has a value for aria-roledescription
. For example, an assistive technology that provides functions for navigating to the next region
or button
SHOULD allow those functions to navigate to regions and buttons that have an aria-roledescription
.
The following two examples show the use of aria-roledescription
to indicate that a non-interactive container is a "slide" in a web-based presentation application.
<div role="article" aria-roledescription="slide" id="slide" aria-labelledby="slideheading">
<h1 id="slideheading">Quarterly Report</h1>
</div>
<article aria-roledescription="slide" id="slide" aria-labelledby="slideheading">
<h1 id="slideheading">Quarterly Report</h1>
</article>
In the previous examples, a screen reader user might hear "Quarterly Report, slide" rather than the more vague "Quarterly Report, article" or "Quarterly Report, group."
Characteristics: Characteristic Value Used in Roles: All elements of the base markup except for the following roles:generic
Value: string aria-rowcount
property
Defines the total number of rows in a table
, grid
, or treegrid
. See related aria-rowindex
.
If all of the rows are present in the DOM, it is not necessary to set this attribute as the user agent can automatically calculate the total number of rows. However, if only a portion of the rows is present in the DOM at a given moment, this attribute is needed to provide an explicit indication of the number of rows in the full table.
Authors MUST set the value of aria-rowcount
to an integer equal to the number of rows in the full table. If the total number of rows is unknown, authors MUST set the value of aria-rowcount
to -1
to indicate that the value should not be calculated by the user agent.
The following example shows a grid with 2000 rows, of which the first row and rows 100 through 102 are displayed to the user.
<div role="grid" aria-rowcount="2000">
<div role="rowgroup">
<div role="row" aria-rowindex="1">
<span role="columnheader">First Name</span>
<span role="columnheader">Last Name</span>
<span role="columnheader">Company</span>
<span role="columnheader">Phone</span>
</div>
</div>
<div role="rowgroup">
<div role="row" aria-rowindex="100">
<span role="gridcell">Fred</span>
<span role="gridcell">Jackson</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">555-1234</span>
</div>
<div role="row" aria-rowindex="101">
<span role="gridcell">Sara</span>
<span role="gridcell">James</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">555-1235</span>
</div>
<div role="row" aria-rowindex="102">
<span role="gridcell">Taylor</span>
<span role="gridcell">Johnson</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">555-1236</span>
</div>
</div>
</div>
aria-rowindex
property
Defines an element's row index or position with respect to the total number of rows within a table
, grid
, or treegrid
. See related aria-rowindextext
, aria-rowcount
, and aria-rowspan
.
If all of the rows are present in the DOM, it is not necessary to set this attribute as the user agent can automatically calculate the index of each row. However, if only a portion of the rows is present in the DOM at a given moment, this attribute is needed to provide an explicit indication of each row's position with respect to the full table.
Authors MUST set the value for aria-rowindex
to an integer greater than or equal to 1, greater than the aria-rowindex
value of any previous rows, and less than or equal to the number of rows in the full table. For a cell or gridcell which spans multiple rows, authors MUST set the value of aria-rowindex
to the start of the span.
Authors SHOULD place aria-rowindex
on each row. Authors MAY also place aria-rowindex
on all of the accessibility children of each row.
The following example shows a grid with 2000 rows, of which the first row and rows 100 through 102 are displayed to the user.
<div role="grid" aria-rowcount="2000">
<div role="rowgroup">
<div role="row" aria-rowindex="1">
<span role="columnheader">First Name</span>
<span role="columnheader">Last Name</span>
<span role="columnheader">Company</span>
<span role="columnheader">Phone</span>
</div>
</div>
<div role="rowgroup">
<div role="row" aria-rowindex="100">
<span role="gridcell">Fred</span>
<span role="gridcell">Jackson</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">555-1234</span>
</div>
<div role="row" aria-rowindex="101">
<span role="gridcell">Sara</span>
<span role="gridcell">James</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">555-1235</span>
</div>
<div role="row" aria-rowindex="102">
<span role="gridcell">Taylor</span>
<span role="gridcell">Johnson</span>
<span role="gridcell">Acme, Inc.</span>
<span role="gridcell">555-1236</span>
</div>
</div>
</div>
The following example shows the grid from the previous example with aria-rowindex
also placed on all of the accessibility children of each row.
<div role="grid" aria-rowcount="2000">
<div role="rowgroup">
<div role="row" aria-rowindex="1">
<span role="columnheader" aria-rowindex="1">First Name</span>
<span role="columnheader" aria-rowindex="1">Last Name</span>
<span role="columnheader" aria-rowindex="1">Company</span>
<span role="columnheader" aria-rowindex="1">Phone</span>
</div>
</div>
<div role="rowgroup">
<div role="row" aria-rowindex="100">
<span role="gridcell" aria-rowindex="100">Fred</span>
<span role="gridcell" aria-rowindex="100">Jackson</span>
<span role="gridcell" aria-rowindex="100">Acme, Inc.</span>
<span role="gridcell" aria-rowindex="100">555-1234</span>
</div>
<div role="row" aria-rowindex="101">
<span role="gridcell" aria-rowindex="101">Sara</span>
<span role="gridcell" aria-rowindex="101">James</span>
<span role="gridcell" aria-rowindex="101">Acme, Inc.</span>
<span role="gridcell" aria-rowindex="101">555-1235</span>
</div>
<div role="row" aria-rowindex="102">
<span role="gridcell" aria-rowindex="102">Taylor</span>
<span role="gridcell" aria-rowindex="102">Johnson</span>
<span role="gridcell" aria-rowindex="102">Acme, Inc.</span>
<span role="gridcell" aria-rowindex="102">555-1236</span>
</div>
</div>
</div>
aria-rowindextext
property
Defines a human readable text alternative of aria-rowindex
. See related aria-colindextext
.
Authors SHOULD only use aria-rowindextext
when the provided or calculated value of aria-rowindex
is not meaningful or does not reflect the displayed index, as can be seen in the game Battleship.
Authors SHOULD NOT use aria-rowindextext
as a replacement for aria-rowindex
because some assistive technologies rely upon the numeric row index for the purpose of keeping track of the user's position or providing alternative table navigation.
Authors SHOULD place aria-rowindextext
on each row. Authors MAY also place aria-rowindextext
on all of the accessibility children of each row.
aria-rowspan
property
Defines the number of rows spanned by a cell or gridcell within a table
, grid
, or treegrid
. See related aria-rowindex
and aria-colspan
.
This attribute is intended for cells and gridcells which are not contained in a native table. When defining the row span of cells or gridcells in a native table, authors SHOULD use the host language's attribute instead of aria-rowspan
. If aria-rowspan
is used on an element for which the host language provides an equivalent attribute, user agents MUST ignore the value of aria-rowspan
and instead expose the value of the host language's attribute to assistive technologies.
Authors MUST set the value of aria-rowspan
to an integer greater than or equal to 0 and less than the value which would cause the cell or gridcell to overlap the next cell or gridcell in the same column. Setting the value to 0 indicates that the cell or gridcell is to span all the remaining rows in the row group.
aria-selected
state Values: Value Description false The selectable element is not selected. true The selectable element is selected. undefined (default) The element is not selectable. aria-setsize
property
Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related aria-posinset
.
This property is marked on the members of a set, not the container element that collects the members of the set. To orient the user by saying an element is "item X out of Y," the assistive technologies would use X equal to the aria-posinset
attribute and Y equal to the aria-setsize
attribute.
If all items up to the current item in a set are present in the document structure, it is not necessary to set this attribute, as the user agent can automatically calculate the position for these items. However, if all previous items in the set are not present in the document structure at a given moment, the author MUST set this attributeto provide an explicit indication of an element's position.
When specifying aria-setsize
, authors MUST set the value to an integer equal to the number of items in the set. If the total number of items is unknown, authors SHOULD set the value of aria-setsize
to -1
.
When specifying aria-setsize
on a menuitem
, menuitemcheckbox
, or menuitemradio
, authors SHOULD set the value of aria-setsize
based on the total number of items in the menu
, excluding any separators.
The following example shows items 5 through 8 in a set of 16.
<h2 id="label_fruit"> Available Fruit </h2>
<ul role="listbox" aria-labelledby="label_fruit">
<li role="option" aria-setsize="16" aria-posinset="5"> apples </li>
<li role="option" aria-setsize="16" aria-posinset="6"> bananas </li>
<li role="option" aria-setsize="16" aria-posinset="7"> cantaloupes </li>
<li role="option" aria-setsize="16" aria-posinset="8"> dates </li>
</ul>
The following example shows items 5 through 8 in a set whose total size is unknown.
<h2 id="label_fruit"> Available Fruit </h2>
<ul role="listbox" aria-labelledby="label_fruit">
<li role="option" aria-setsize="-1" aria-posinset="5"> apples </li>
<li role="option" aria-setsize="-1" aria-posinset="6"> bananas </li>
<li role="option" aria-setsize="-1" aria-posinset="7"> cantaloupes </li>
<li role="option" aria-setsize="-1" aria-posinset="8"> dates </li>
</ul>
aria-sort
property
Indicates if items in a table or grid are sorted in ascending or descending order.
Authors SHOULD only apply this property to table headers or grid headers. If the property is not provided, there is no defined sort order. For each table or grid, authors SHOULD apply aria-sort
to only one header at a time.
aria-valuemax
property
Defines the maximum allowed value for a range widget.
Authors MUST ensure the value of aria-valuemax
is greater than or equal to the value of aria-valuemin
. If the aria-valuenow
has a known maximum and minimum, the author SHOULD provide properties for aria-valuemax
and aria-valuemin
.
Note
A range widget starts with a given value, which can be increased until reaching the maximum value, defined by this property. Declaring the minimum and maximum values allows assistive technology to convey the size of the range to users.
aria-valuemin
property
Defines the minimum allowed value for a range widget.
Authors MUST ensure the value of aria-valuemin
is less than or equal to the value of aria-valuemax
. If the aria-valuenow
has a known maximum and minimum, the author SHOULD provide properties for aria-valuemax
and aria-valuemin
.
Note
A range widget starts with a given value, which can be decreased until reaching the minimum value, defined by this property. Declaring the minimum and maximum values allows assistive technology to convey the size of the range to users.
aria-valuenow
property
Defines the current value for a range widget. See related aria-valuetext
.
This property is used, for example, on a range widget such as a slider or progress bar.
If the current value is not known (for example, an indeterminate progress bar), the author SHOULD NOT set the aria-valuenow
attribute. If the aria-valuenow
attribute is absent, no information is implied about the current value. If the aria-valuenow
has a known maximum and minimum, the author SHOULD provide properties for aria-valuemax
and aria-valuemin
.
The value of aria-valuenow
is a decimal number. If the range is a set of numeric values, then aria-valuenow
is one of those values. For example, if the range is [0, 1], a valid aria-valuenow
is 0.5. A value outside the range, such as -2.5 or 1.1, is invalid.
For progressbar
elements and scrollbar
elements, assistive technologies SHOULD render the value to users as a percent, calculated as a position on the range from aria-valuemin
to aria-valuemax
if both are defined, otherwise the actual value with a percent indicator. For elements with role slider
and spinbutton
, assistive technologies SHOULD render the actual value to users.
When the rendered value cannot be accurately represented as a number, authors SHOULD use the aria-valuetext
attribute in conjunction with aria-valuenow
to provide a user-friendly representation of the range's current value. For example, a slider might have rendered values of small
, medium
, and large
. In this case, the values of aria-valuetext
would be one of the strings: small
, medium
, or large
.
aria-valuetext
property
Defines the human readable text alternative of aria-valuenow
for a range widget.
This property is used, for example, on a range widget such as a slider or progress bar.
If the aria-valuetext
attribute is set, authors SHOULD also set the aria-valuenow
attribute, unless that value is unknown (for example, on an indeterminate progressbar
).
Authors SHOULD only set the aria-valuetext
attribute when the rendered value cannot be meaningfully represented as a number. For example, a slider might have rendered values of small
, medium
, and large
. In this case, the values of aria-valuenow
could range from 1 through 3, which indicate the position of each value in the value space, but the aria-valuetext
would be one of the strings: small
, medium
, or large
. If the aria-valuetext
attribute is absent, the assistive technologies will rely solely on the aria-valuenow
attribute for the current value.
If aria-valuetext
is specified, assistive technologies SHOULD render that value instead of the value of aria-valuenow
.
The accessibility tree and the DOM tree are parallel structures. The accessibility tree includes the user interface objects of the user agent and the objects of the document. Accessible objects are created in the accessibility tree for every DOM element that should be exposed to an assistive technology, either because it might fire an accessibility event or because it has a property, relationship or feature which needs to be exposed.
The following elements are not exposed via the accessibility API and user agents MUST NOT include them in the accessibility tree:
display:none
, visibility:hidden
, or the HTML hidden
attribute.none
or presentation
as the first role in the role attribute. However, their exclusion is conditional. In addition, the element's descendants and text content are generally included. These exceptions and conditions are documented in the presentation (role) section.If not already excluded from the accessibility tree per the above rules, user agents SHOULD NOT include the following elements in the accessibility tree:
aria-hidden
set to true
. In other words, aria-hidden="true"
on a parent overrides aria-hidden="false"
on descendants.Any descendants of elements that have the characteristic "Children Presentational: True" unless the descendant is not allowed to be presentational because it meets one of the conditions for exception described in Presentational Roles Conflict Resolution. However, the text content of any excluded descendants is included.
Elements with the following roles have the characteristic "Children Presentational: True":
If not excluded from the accessibility tree per the rules above in Excluding Elements in the Accessibility Tree, user agents MUST provide an accessible object in the accessibility tree for DOM elements that meet any of the following criteria:
aria-hidden
attribute set to true
.aria-activedescendant
attribute.aria-hidden
set to true
. (See Excluding Elements in the Accessibility Tree for additional guidance on aria-hidden
.)The following terms are used to describe relationships between DOM elements.
The accessibility children of a DOM element are all of the children of that element's corresponding accessible object in the accessibility tree. In terms of the DOM, that includes the following (with exclusions listed blow):
generic
or none
intervening.aria-owns
relationship to the element.generic
or none
specified via aria-owns
with only elements of role generic
or none
intervening.And excludes the following:
aria-owns
.In the following example, the list
element has four accessibility children:
<div role="list" aria-owns="child3 child4">
<div role="listitem">Accessibility Child 1</div>
<div>
<div role="listitem">Accessibility Child 2</div>
</div>
</div>
<div id="child3" role="listitem">Accessibility Child 3</div>
<div id="child4">
<div role="listitem">Accessibility Child 4</div>
</div>
In the following example, the first list
element has no accessibility children, where as the second list
element has one accessibility child, specifically the listitem
with ID value "reparented".
<div role="list">
<div role="listitem" aria-hidden="true">Excluded element</div>
<div role="listitem" id="reparented">Reparented element</div>
</div>
<div role="list" aria-owns="reparented"></div>
The accessibility descendants of a DOM element are all DOM elements which correspond to descendants of the corresponding accessible object in the accessibility tree.
The accessibility parent of a DOM element is the parent of the corresponding accessible object in the accessibility tree. In terms of the DOM, the accessibility parent is one of the following:
generic
or none
intervening.aria-owns
set to the DOM ID of the DOM element in question.aria-owns
set to the DOM ID of an ancestor of the DOM element in question, with only elements of role generic
or none
intervening.The following four examples all contain a listitem
element with an accessibility parent of role list
:
<div role="list">
<div role="listitem">The "list" is my accessibility parent.</div>
</div>
<div role="list">
<div>
<div role="listitem">The "list" is my accessibility parent.</div>
</div>
</div>
<div role="list" aria-owns="child"></div>
<div id="child" role="listitem">The "list" is my accessibility parent.</div>
<div role="list" aria-owns="child"></div>
<div id="child">
<div role="listitem">The "list" is my accessibility parent.</div>
</div>
The roles, state, and properties defined in this specification do not form a complete web language or format. They are intended to be used in the context of a host language. This section discusses how host languages are to implement WAI-ARIA, to ensure that the markup specified here will integrate smoothly and effectively with the host language markup.
A host language is a markup-based language in which ARIA can be used as an accessibility enhancement technology. Examples include [HTML] and [SVG2], which both explicitly support the use of ARIA.
Although markup languages look alike superficially, they do not share language definition infrastructure. To accommodate differences in language-building approaches, the requirements are both general and modularization-specific. While allowing for differences in how the specifications are written, the intent is to maintain consistency in how the WAI-ARIA information looks to authors and how it is manipulated in the DOM by scripts.
WAI-ARIA roles, states, and properties are implemented as attributes of elements. Roles are applied by placing their names among the tokens appearing in the value of a host-language-provided role
attribute. States and properties each get their own attribute, with values as defined for each particular state or property in this specification. The name of the attribute is the aria-prefixed name of the state or property.
An implementing host language will provide a role
attribute with the following characteristics:
An implementing host language MUST allow attributes with the following characteristics:
aria-busy
, aria-selected
, aria-activedescendant
, aria-valuetext
;Host languages that support XML Namespaces [XML-NAMES] MAY require that WAI-ARIA attributes be used with a namespace. In this case, the namespace for WAI-ARIA state and property attributes MUST be http://www.w3.org/ns/wai-aria/
. To use WAI-ARIA in host languages that do not explicitly describe support for it, authors SHOULD use this namespace as well, if the host language supports namespaces and there is expectation that user agents will recognize the WAI-ARIA namespace. The namespace prefix is not defined by this specification but generally is expected to be "aria
".
Note
The WAI-ARIA state and property attributes have a naming convention such that they all begin with the string "aria-
". This is not a namespace prefix, it is a part of the state or property name. Therefore, when using WAI-ARIA states and properties with namespace prefixes, the complete attribute name will be like "aria:aria-foo
".
Some host languages do not use namespaces with WAI-ARIA state and property attributes, either because the host language does not support namespaces or because the designers wish to incorporate WAI-ARIA into the core feature set. In these host languages, the namespace name for these attributes has no value. The names of these attributes do not have a prefix offset by a colon; in the terms of namespaces they are unprefixed attribute names. The ECMAScript binding of the DOM interface getAttributeNS
for example, treats the empty string (""
) as representing this condition, so that both getAttribute("aria-busy")
and getAttributeNS("", "aria-busy")
access the same aria-busy
attribute in the DOM.
Note
According to the requirements of this section, some user agents recognize WAI-ARIA state and property attributes with namespaces, some without namespaces, and some might recognize both. Authors are advised to be aware of which form is supported for the host language they are using. Unless the host language and supporting user agents explicitly indicate that the namespace is required, authors are advised to use the attribute without namespaces. Even user agents that support namespaces generally do not publish namespaced WAI-ARIA states and properties to accessibility APIs. In particular, current implementations of HTML, including XHTML, do not support this namespace.
An implementing host language MUST provide support for the author to make all interactive elements focusable, that is, any renderable or event-receiving elements. An implementing host language MUST provide a facility to allow authors to define whether these focusable, interactive elements appear in the default tab navigation order. The tabindex
attribute in HTML is an example of one implementation.
WAI-ARIA is designed to provide semantic information about objects when host languages lack native semantics for the object. WAI-ARIA is designed, however, to provide additional semantics for many host languages. Furthermore, host languages over time can evolve and provide new native features that correspond to WAI-ARIA features. Therefore, there are many situations in which WAI-ARIA semantics are redundant with host language semantics.
These host language features can be viewed as having "implicit WAI-ARIA semantics". User agent processing of features with implicit WAI-ARIA semantics would be similar to the processing for the WAI-ARIA feature. The processing might not be identical because of lexical differences between the host language feature and the WAI-ARIA feature, but generally the user agent would expose the same information to the accessibility API. Features with implicit WAI-ARIA semantics satisfy WAI-ARIA structural requirements such as Required Accessibility Parent Roles, Allowed Accessibility Child Roles, required states and properties, etc. and do not require explicit WAI-ARIA semantics to be provided. On elements with implicit WAI-ARIA roles, authors can also use WAI-ARIA states and properties supported by those roles without requiring explicit indication of the WAI-ARIA role.
For example, if an element with the functionality already exists, such as a checkbox or radio button, use the native semantics of the host language. WAI-ARIA markup is only intended to be used to enhance the native semantics (e.g., indicating that the element is required with aria-required
), or to change the semantics to a different purpose from the standard functionality of the element.
Implicit WAI-ARIA semantics affect the conflict resolution procedures in the following section, Conflicts with Host Language Semantics. Therefore, implicit WAI-ARIA semantics need to be defined in a normative specification, such as the host language specification or the Core Accessibility API Mappings.
WAI-ARIA roles, states, and properties are intended to add semantic information when native host language elements with these semantics are not available, and are generally used on elements that have no native semantics of their own. They can also be used on elements that have similar but non-identical semantics (for example, a nested list could be used to represent a tree structure). This method can be part of a fallback strategy for older browsers that have no WAI-ARIA implementation, or because native presentation of the repurposed element reduces the amount of style and/or script needed. Except for the cases outlined below, user agents MUST always use the WAI-ARIA semantics to define how it exposes the element to accessibility APIs, rather than using the host language semantics.
In addition to these normal situations in which WAI-ARIA is expected to override native semantics, there are elements that are inappropriate to override with WAI-ARIA. This could be because identical host language semantics exist, so WAI-ARIA is not needed, or because semantics from WAI-ARIA directly conflict with host language semantics. When a feature in the host language with identical role semantics and values is available, and the author has no compelling reason to avoid using the host language feature, authors SHOULD use the host language features rather than repurpose other elements with WAI-ARIA.
Host languages can have features that have implicit WAI-ARIA semantics corresponding to roles. When a WAI-ARIA role is provided, user agents MUST use the semantic of the WAI-ARIA role for processing, not the native semantic, unless the role requires WAI-ARIA states and properties whose attributes are explicitly forbidden on the native element by the host language. Values for roles do not conflict in the same way as values for states and properties (for example, the HTML 'checked' attribute and the 'aria-checked' attribute could have conflicting values), and authors are expected to have valid reason to provide a WAI-ARIA role even on elements that would not normally be repurposed.
When WAI-ARIA states and properties correspond to host language features that have the same implicit WAI-ARIA semantic, it can be particularly problematic to use the WAI-ARIA feature. If the WAI-ARIA feature and the host language feature are both provided but their values are not kept in sync, user agents and assistive technologies cannot know which value to use. Therefore, to prevent providing conflicting states and properties to assistive technologies, host languages MUST explicitly declare where the use of WAI-ARIA attributes on each host language element conflicts with native features for that element. When a host language declares a WAI-ARIA attribute to be in direct semantic conflict with a native feature for a given element, user agents MUST ignore the WAI-ARIA attribute and instead use the host language feature with the same implicit semantic.
Host languages MAY document features that cannot be overridden with WAI-ARIA (these are called "strong native semantics"). These can be features that have implicit WAI-ARIA semantics, as well as features where the processing would be uncertain if the semantics were changed with WAI-ARIA. Conformance checkers MAY signal an error or warning when a WAI-ARIA role is used on elements with strong native semantics, but as described above, user agents MUST still use the value of the semantic of the WAI-ARIA role when exposing the element to accessibility APIs unless the native host language semantic is permanently presentational.
The opportunity for host languages to create exceptions to the WAI-ARIA override of native features is meant to avoid potential author errors or problems with intrinsic processing of host language features. Author errors could happen when a host language and WAI-ARIA provide similar but not identical features, where it might not be clear how changing one but not the other affects the accessibility API. Intrinsic processing refers to the way a feature is processed, beyond simple rendering and exposure to the Accessibility API, that cannot reasonably be changed in response to an ARIA feature, and would lead to unpredictable results were ARIA allowed. In these situations, there is good reason for host languages to limit the scope of WAI-ARIA. However, this provision does not give blanket permission for host languages to forbid the use of WAI-ARIA simply by documenting, feature by feature, that it cannot be used. Host languages should create restrictions on the use of ARIA only when it is critical to effective processing of content.
Certain ARIA features are critical to building a complete model in the accessibility API. Such features are not expected to conflict with native host language semantics (though they can complement them). Therefore, host languages MUST NOT declare strong native semantics that prevent use of the following ARIA features:
State and property attributes are included in host languages, and therefore syntax for representation of their value types is governed by the host language. For each of the value types defined in Value, an appropriate value type from the host language is used. Recommended correspondences between WAI-ARIA value types and various host language value types are listed in Mapping WAI-ARIA Value types to languages. This is a non-normative mapping in order to accommodate new host languages supporting WAI-ARIA.
The list value types—ID reference list and token list—allow more than one value of the given type to be provided. The values are separated by delimiter characters recognized by the host language for list attributes, such as space characters, commas, etc. Some languages might require a specific, single delimiter, while others might allow various delimiters.
Global states and properties are supported on any element in the host language. However, authors MUST only use non-global states and properties on elements with a role supporting the state or property; either defined as an explicit WAI-ARIA role, or as defined by the host language implicit WAI-ARIA semantic matching an appropriate WAI-ARIA role. When a role attribute is added to an element, the semantics and behavior of the element, including support for WAI-ARIA states and properties, are augmented or overridden by the role behavior. User agents MUST ignore non-global states and properties used on an element without a role supporting the state or property; either defined as an explicit WAI-ARIA role, or as defined by the host language WAI-ARIA semantic matching an appropriate WAI-ARIA role. For example, the aria-valuetext
attribute can be used on a progressbar
.
WAI-ARIA roles have associated states and properties that are qualified as "supported" or "required". An example of a property supported by the combobox role is aria-autocomplete. The property is designated "supported" in this case because a given combobox
might or might not implement auto completion. In contrast, the combobox
role requires the aria-expanded state in order to indicate that it is expandable. Comboboxes have a controlled popup element, such as a listbox
, that is either open or closed. If the listbox
is open, the combobox
is in its expanded state; otherwise it is collapsed.
When WAI-ARIA roles are used, supported states and properties that are not present in the DOM are treated according to their default value. Keeping with the combobox
example, a missing aria-autocomplete
attribute is equivalent to aria-autocomplete="none"
, meaning the combobox
does not offer auto completion.
However, required states and properties that are absent are an author error. Missing required states and properties are processed as detailed at Handling Author Errors.
Elements that have implicit WAI-ARIA semantics support the full set of WAI-ARIA states and properties supported by the corresponding role. Therefore, authors MAY omit the role when setting states and properties. The role is only needed when the implicit WAI-ARIA role of the element needs to be changed.
Sometimes states and properties are present in the DOM but have a zero-length string ("") as their value. Authors MAY specify a zero-length string ("") for any supported (but not required) state or property. User agents SHOULD treat state and property attributes with a value of "" the same as they treat an absent attribute. For supported states and properties, this corresponds to the default value, but if it is a required attribute, it signals an author error and is processed as detailed at Handling Author Errors.
user agents SHOULD ignore ID references that do not match the ID of another element in the same document.
It is the author's responsibility to ensure that IDs are unique. If more than one element has the same ID, the user agent SHOULD use the first element found with the given ID. The behavior will be the same as getElementById
.
If the same element is specified multiple times in a single WAI-ARIA relation, user agents SHOULD return multiple pointers to the same element.
aria-activedescendant
is defined as referencing only a single ID reference. Any aria-activedescendant
value that does not match an existing ID reference exactly is an author error and will not match any element in the DOM.
Note
This section might be removed in a future version.
Support for attribute selectors MUST include WAI-ARIA attributes. For example, .fooMenuItem[aria-haspopup="true"] would select all elements with class fooMenuItem
, and WAI-ARIA property aria-haspopup
with value of true
. The presentation MUST be updated for dynamic changes to WAI-ARIA attributes. This allows authors to match styling with WAI-ARIA semantics.
User agents are expected to perform validation of WAI-ARIA roles.
As stated in the Definition of Roles section, it is considered an authoring error to use abstract roles in content. User agents MUST NOT map abstract roles via the standard role mechanism of the accessibility API.
If the role
attribute contains no tokens matching the name of a non-abstract WAI-ARIA role, the user agent MUST treat the element as if no role had been provided. For example, <table role="foo">
should be exposed in the same way as <table>
and <input type="text" role="structure">
in the same way as <input type="text">
.
Certain landmark roles require names from authors. In situations where an author has not specified names for these landmarks, it is considered an authoring error. The user agent MUST treat such elements as if no role had been provided. If a valid fallback role had been specified, or if the element had an implicit ARIA role, then user agents would continue to expose that role, instead. Instances of such roles are as follows:
In general, user agents do not do much validation of WAI-ARIA properties. User agents MAY do some minor validation on request and enforce things like aria-posinset
being within 1 and aria-setsize
, inclusive. User agents are not responsible for logical validation, such as the following:
checkbox
actually behaves like a checkbox.aria-activedescendant
actually points to an accessibility descendant of the container widget.aria-setsize
and aria-posinset
when they are specified on some but not all the elements of the set.If the author specifies a non-numeric value for a decimal or integer value type, the user agent SHOULD do the following:
If a WAI-ARIA property contains an unknown or disallowed value, the user agent SHOULD expose to platform accessibility APIs as follows:
Note
In UIA, the user agent might leave the corresponding property set to "unsupported."
User agents MUST NOT expose WAI-ARIA attributes that reference unresolved IDs. For example:
If a required WAI-ARIA attribute for a given role is missing, user agents SHOULD process the attribute as if the values given in the following table were provided.
Note
Implicit values for non-required states and properties appear in the characteristics table for each role. These are not considered fallback values so are not included here.
There are a number of ways presentational role conflicts are resolved.
User agents MUST NOT expose elements having explicit or inherited presentational role in the accessibility tree, with these exceptions:
none
/presentation
role and expose the element with its implicit role, in order to ensure that the element is operable.none
/presentation
role and instead expose the element's implicit role. However, if an element has only non-global, role-specific WAI-ARIA states or properties, the element MUST NOT be exposed unless the presentational role is inherited and an explicit non-presentational role is applied.Note
Some global WAI-ARIA states and properties are prohibited on certain roles. These states and properties are still considered global for the purposes of Presentational Role Conflict resolution.
For example, aria-describedby
is a global attribute and would always be applied; aria-level
is not a global attribute and would therefore only apply if the element was not in a presentational state.
<h1 role="none" aria-describedby="comment-1"> Sample Content </h1>
<h1 role="none" aria-level="2"> Sample Content </h1>
Authors MUST NOT use presentation
and none
on elements where user agents will ignore that role because it conflicts with one of the above items.
Conforming user agents MUST implement the following IDL interface.
interface mixin ARIAMixin
{
[CEReactions, Reflect] attribute DOMString? role
;
[CEReactions, Reflect="aria-activedescendant"] attribute Element? ariaActiveDescendantElement
;
[CEReactions, Reflect="aria-atomic"] attribute DOMString? ariaAtomic
;
[CEReactions, Reflect="aria-autocomplete"] attribute DOMString? ariaAutoComplete
;
[CEReactions, Reflect="aria-braillelabel"] attribute DOMString? ariaBrailleLabel
;
[CEReactions, Reflect="aria-brailleroledescription"] attribute DOMString? ariaBrailleRoleDescription
;
[CEReactions, Reflect="aria-busy"] attribute DOMString? ariaBusy
;
[CEReactions, Reflect="aria-checked"] attribute DOMString? ariaChecked
;
[CEReactions, Reflect="aria-colcount"] attribute DOMString? ariaColCount
;
[CEReactions, Reflect="aria-colindex"] attribute DOMString? ariaColIndex
;
[CEReactions, Reflect="aria-colindextext"] attribute DOMString? ariaColIndexText
;
[CEReactions, Reflect="aria-colspan"] attribute DOMString? ariaColSpan
;
[CEReactions, Reflect="aria-controls"] attribute FrozenArray<Element>? ariaControlsElements
;
[CEReactions, Reflect="aria-current"] attribute DOMString? ariaCurrent
;
[CEReactions, Reflect="aria-describedby"] attribute FrozenArray<Element>? ariaDescribedByElements
;
[CEReactions, Reflect="aria-description"] attribute DOMString? ariaDescription
;
[CEReactions, Reflect="aria-details"] attribute FrozenArray<Element>? ariaDetailsElements
;
[CEReactions, Reflect="aria-disabled"] attribute DOMString? ariaDisabled
;
[CEReactions, Reflect="aria-errormessage"] attribute FrozenArray<Element>? ariaErrorMessageElements
;
[CEReactions, Reflect="aria-expanded"] attribute DOMString? ariaExpanded
;
[CEReactions, Reflect="aria-flowto"] attribute FrozenArray<Element>? ariaFlowToElements
;
[CEReactions, Reflect="aria-hidden"] attribute DOMString? ariaHidden
;
[CEReactions, Reflect="aria-invalid"] attribute DOMString? ariaInvalid
;
[CEReactions, Reflect="aria-keyshortcuts"] attribute DOMString? ariaKeyShortcuts
;
[CEReactions, Reflect="aria-label"] attribute DOMString? ariaLabel
;
[CEReactions, Reflect="aria-labelledby"] attribute FrozenArray<Element>? ariaLabelledByElements
;
[CEReactions, Reflect="aria-level"] attribute DOMString? ariaLevel
;
[CEReactions, Reflect="aria-live"] attribute DOMString? ariaLive
;
[CEReactions, Reflect="aria-modal"] attribute DOMString? ariaModal
;
[CEReactions, Reflect="aria-multiline"] attribute DOMString? ariaMultiLine
;
[CEReactions, Reflect="aria-multiselectable"] attribute DOMString? ariaMultiSelectable
;
[CEReactions, Reflect="aria-orientation"] attribute DOMString? ariaOrientation
;
[CEReactions, Reflect="aria-owns"] attribute FrozenArray<Element>? ariaOwnsElements
;
[CEReactions, Reflect="aria-placeholder"] attribute DOMString? ariaPlaceholder
;
[CEReactions, Reflect="aria-posinset"] attribute DOMString? ariaPosInSet
;
[CEReactions, Reflect="aria-pressed"] attribute DOMString? ariaPressed
;
[CEReactions, Reflect="aria-readonly"] attribute DOMString? ariaReadOnly
;
[CEReactions, Reflect="aria-relevant"] attribute DOMString? ariaRelevant
;
[CEReactions, Reflect="aria-required"] attribute DOMString? ariaRequired
;
[CEReactions, Reflect="aria-roledescription"] attribute DOMString? ariaRoleDescription
;
[CEReactions, Reflect="aria-rowcount"] attribute DOMString? ariaRowCount
;
[CEReactions, Reflect="aria-rowindex"] attribute DOMString? ariaRowIndex
;
[CEReactions, Reflect="aria-rowindextext"] attribute DOMString? ariaRowIndexText
;
[CEReactions, Reflect="aria-rowspan"] attribute DOMString? ariaRowSpan
;
[CEReactions, Reflect="aria-selected"] attribute DOMString? ariaSelected
;
[CEReactions, Reflect="aria-setsize"] attribute DOMString? ariaSetSize
;
[CEReactions, Reflect="aria-sort"] attribute DOMString? ariaSort
;
[CEReactions, Reflect="aria-valuemax"] attribute DOMString? ariaValueMax
;
[CEReactions, Reflect="aria-valuemin"] attribute DOMString? ariaValueMin
;
[CEReactions, Reflect="aria-valuenow"] attribute DOMString? ariaValueNow
;
[CEReactions, Reflect="aria-valuetext"] attribute DOMString? ariaValueText
;
};
Element includes ARIAMixin
;
The following table provides a correspondence between IDL attribute names and content attribute names, for use by ARIAMixin
. It also lists their correspondence to value type for informative purposes.
This section is non-normative.
Though specification authors can make exceptions to this pattern, the following rules were used to disambiguate names and case of the IDL attributes listed above.
aria-valuetext
becomes ariaValueText
with both the V and T capitalized.aria-multiselectable
becomes ariaMultiSelectable
with both the M and S capitalized.aria-multiline
becomes ariaMultiLine
with both the M and L capitalized.aria-placeholder
becomes ariaPlaceholder
with only the P capitalized.This section is non-normative.
Any notes or exceptions for specific attribute names will be listed here.
ariaPosInSet
: The aria-posinset
attribute refers to an item's position in a set (two words: "in set") rather than the "inset" of an item from the beginning of the collection. Therefore the IDL attribute name is ariaPosInSet
with the P, I, and second S capitalized, not ariaPosInset
.This section is non-normative.
The primary purpose of ARIA IDL attribute reflection is to ease JavaScript-based manipulation of values. The following examples demonstrate its usage.
<div id="inaccessibleButton">
</div>
let el = document.getElementById('inaccessibleButton');
el.tabIndex = 0;
el.role = "button";
el.ariaLabel = "Edit";
el.role;
el.ariaLabel;
el.setAttribute("role", "button");
el.setAttribute("aria-label", "Edit");
el.getAttribute("role");
el.getAttribute("aria-label");
el.setAttribute("aria-label", "Delete");
el.ariaLabel;
el.ariaLabel = "Publish";
el.getAttribute("aria-label");
This section is non-normative.
This specification introduces no new security considerations.
This section is non-normative.
In accordance with Web Platform Design Principles, this specification provides no programmatic interface to determine if information is being used by Assistive Technologies. However, this specification does allow an author to present different information to users of Assistive Technologies from the information available to users who do not use Assistive Technologies. This is possible using many features of the ARIA specification, just as this is possible using many other parts of the web technology stack. This content disparity could be abused to perform active fingerprinting of users of Assistive Technologies.
This section is non-normative.
Note
The suggested mappings for true/false values in HTML use Keyword and enumerated attributes with allowed values of true
and false
, instead of using the HTML boolean value type.
The table below provides recommended mappings between WAI-ARIA state and property types and attribute types from HTML Standard and W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes.
Languages not listed below might have appropriate value types defined in the language. If they do not, we recommend XML Schema Datatypes for general purpose XML languages. Documents using DTDs instead of schemas will not be able to validate automatically and require additional processing on WAI-ARIA attributes.
aria-braillelabel
suggestion
addedaria-details
to allow multiple IDrefscomment
addedaria-description
mark
: Addedaria-brailleroledescription
suggestion
(#1293)This section is non-normative.
The following people contributed to the development of this document.
This publication has been funded in part with U.S. Federal funds from the Department of Education, National Institute on Disability, Independent Living, and Rehabilitation Research (NIDILRR), initially under contract number ED-OSE-10-C-0067, then under contract number HHSP23301500054C, and now under HHS75P00120P00168. The content of this publication does not necessarily reflect the views or policies of the U.S. Department of Education, nor does mention of trade names, commercial products, or organizations imply endorsement by the U.S. Government.
Referenced in:
Referenced in:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.5