This section is informative.
WAI-ARIA roles, states, and properties are available in a number of machine-readable formats to support validation of content using WAI-ARIA attributes. WAI-ARIA is not finalized, however, so these files are subject to change without notice.
It is not appropriate to use these document types for live content. These are made available only for download, to support local use in development, evaluation, and validation tools. Using these versions directly from the W3C server could cause automatic blockage, preventing them from loading.
If it is necessary to use schemata in content, follow guidelines to avoid excessive DTD traffic. For instance, use caching proxies to avoid fetching the schema each time it is used, or ensure software uses a local cache, such as with XML catalogs.
The taxonomy for WAI-ARIA expressed in RDF is available from http://www.w3.org/WAI/ARIA/schemata/aria-1.rdf.
This module declares the WAI-ARIA attributes as a module that can be included in a modularized DTD. A sample XHTML DTD using this module follows. Note the WAI-ARIA attributes are in no namespace, and the attribute name begins with "aria-" to reduce the likelihood of collision with existing attributes.
This module is available from http://www.w3.org/MarkUp/DTD/aria-attributes-1.mod.
This DTD extends XHTML 1.1 and adds the WAI-ARIA state and property attributes to all its elements. In order to provide broader keyboard support and conform with the Focus Navigation section above, it also adds the tabindex
attribute to a wider set of elements.
This is not a formal document type and may be obsoleted by future formal XHTML DTDs that support WAI-ARIA.
The XHTML 1.1 plus WAI-ARIA DTD is available from http://www.w3.org/WAI/ARIA/schemata/xhtml-aria-1.dtd.
Documents written using this XHTML Family markup language can be validated using the above DTD. If a document author wants to facilitate such validation, they can include the following declaration at the top of their document:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+ARIA 1.0//EN" "http://www.w3.org/WAI/ARIA/schemata/xhtml-aria-1.dtd">
However, note that when this DOCTYPE is present in a document, most user agents treat the document as generic XML rather than HTML. This causes them to be unable to support named character entities defined by the DTD (e.g., ©). Therefore, authors need to avoid use of named entities outside of the predefined entities in XML ([XML], Section 4.6).
To avoid the above problem, authors can omit the above DOCTYPE statement. This causes user agents to treat the document as generic HTML with named character entity support as well as built-in ARIA support. However, it causes user agents to enter "quirks" mode which affects CSS rendering, and causes conformance checkers to fail the document due to the added ARIA attributes.
To avoid the issues of named character entity support and quirks mode, authors can instead use the following generic DOCTYPE declaration for HTML:
<!DOCTYPE html>
However, this still does not guarantee that documents will be validated by conformance checkers.
This section contains the SGML Open Catalog-format definition [CATALOG] of the public identifiers for XHTML+ARIA 1.0.
-- .......................................................................... -- -- File catalog ............................................................ -- -- XHTML+ARIA Catalog Data File Revision: $Revision: 1.4 $ See "Entity Management", SGML Open Technical Resolution 9401 for detailed information on supplying and using catalog data. This document is available from OASIS at URL: <http://www.oasis-open.org/html/tr9401.html> -- -- .......................................................................... -- -- SGML declaration associated with XHTML .................................. -- OVERRIDE YES SGMLDECL "xml1.dcl" -- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -- -- XHTML+ARIA modules .............................................. -- PUBLIC "-//W3C//DTD XHTML+ARIA 1.0//EN" "xhtml-aria-1.dtd" PUBLIC "-//W3C//ENTITIES XHTML ARIA Attributes 1.0//EN" "aria-attributes-1.mod" -- End of catalog data ..................................................... -- -- .......................................................................... --
This module declares the WAI-ARIA attributes as an XML Schema module that can be included in a modularized schema. Note the WAI-ARIA attributes are in no namespace, and the attribute name begins with "aria-" to reduce the likelihood of collision with existing attributes.
This module is available from http://www.w3.org/MarkUp/SCHEMA/aria-attributes-1.xsd.
This standalone DTD adds WAI-ARIA state and property attributes to all elements in HTML 4.01, as well as a role
attribute. In order to provide broader keyboard support, it also adds the tabindex
attribute to a wider set of elements.
The DTD is based on the HTML 4.01 Transitional DTD, and includes all entity references needed to make it a standalone file. This is not an official W3C DTD and should be considered a derivative work of HTML 4.01.
Documents written using this markup language can be validated using the above DTD. If a document author wants to facilitate such validation, they can include the following declaration at the top of their document:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML+ARIA 1.0//EN" "http://www.w3.org/WAI/ARIA/schemata/html4-aria-1.dtd">
However, note that when this DOCTYPE is present in a document, most user agents treat the document as generic XML rather than HTML. This causes them to be unable to support named character entities defined by the DTD (e.g., ©). Therefore, authors need to avoid use of named entities outside of the predefined entities in XML ([XML], Section 4.6).
To avoid the above problem, authors can omit the above DOCTYPE statement. This causes user agents to treat the document as generic HTML with named character entity support as well as built-in ARIA support. However, it causes user agents to enter "quirks" mode which affects CSS rendering, and causes conformance checkers to fail the document due to the added ARIA attributes.
To avoid the issues of named character entity support and quirks mode, authors can instead use the following generic DOCTYPE declaration for HTML:
<!DOCTYPE html>
However, this still does not guarantee that documents will be validated by conformance checkers.
The HTML Working Group is incorporating WAI-ARIA into HTML 5. Official support for WAI-ARIA in HTML will be provided in that specification. This DTD is made available only as a bridging solution for applications requiring DTD validation but not using HTML 5.
This module is available from http://www.w3.org/WAI/ARIA/schemata/html4-aria-1.dtd.
Editorial note: The HTML 5 column of the table below is expected to be moved to the HTML 5 specification and become normative for that specification. Comments about ARIA lexicial processing in HTML 5 should be taken to the HTML Working Group, referencing ISSUE-129.
Editorial note: The suggested mappings for true/false values in HTML 5 use Keyword and enumerated attributes with allowed values of "true" and "false", instead of using the HTML 5 boolean value type. @@ can't rely on attribute absence because of default value in true/false/undefined case.
The table below provides recommended mappings between WAI-ARIA state and property types and attribute types from HTML 5, XML Schema Datatypes [XSD], SVG, and SGML.
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.
WAI-ARIA type | HTML 5 | XML Schema |
---|---|---|
true/false | Keyword and enumerated attributes with allowed values of "true" and "false" | boolean |
true/false/undefined | Keyword and enumerated attributes with allowed values of "true", "false", and "undefined" | NMTOKEN with an enumeration constraint allowing values of "true", "false", and "undefined" |
tristate | Keyword and enumerated attributes with allowed values of "true", "false", and "mixed" | NMTOKEN with an enumeration constraint allowing values of "true", "false", and "mixed" |
number | Real number | decimal |
integer | Non-negative integer | integer |
token | Keyword and enumerated attributes | NMTOKEN with an enumeration constraint allowing values listed in the state or property definition |
token list | Space-separated tokens | NMTOKENS with an enumeration constraintallowing values listed in the state or property definition |
ID reference | The value of a defined id attribute on another element | IDREF |
ID reference list | The value of one or more defined id attributes on other element(s), represented as Space-separated tokens | IDREFS |
string | No value constraints | string |
false
) for aria-checked
(state) to checkable widget roles: checkbox
, menuitemcheckbox
, menuitemradio
, and radio
.aria-describedat
after much group deliberation.The following table provides a quick reference to the supported states and properties for all WAI-ARIA roles that may be used in markup.
In addition to the states and properties shown in the table, the following global states and properties are supported on all roles.
The following people contributed to the development of this document.
Special thanks to Aaron Leventhal for effort and insight as he implemented a working prototype of accessibility API bindings. Special thanks to Al Gilman for his work while chair of the PFWG in bringing the ARIA technology to fruition.
This publication has been funded in part with Federal funds from the U.S. Department of Education, National Institute on Disability and Rehabilitation Research (NIDRR) under contract number ED05CO0039. 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.