ARIA Proposal

Work in Progress — Last Update 19 November 2007

This version:
http://simon.html5.org/specs/aria-proposal
Latest version:
http://simon.html5.org/specs/aria-proposal
Previous versions:
http://lists.w3.org/Archives/Public/www-archive/2007Sep/att-0106/aria-proposal.html
Editor:
Simon Pieters, Opera Software, simonp@opera.com
Contributor:
Aaron Leventhal, IBM, aleventh@us.ibm.com

Abstract

This proposal defines proper usage of ARIA markup for authors and ARIA markup processing for user agents for both (X)HTML and SVG.

Table of Contents


1. Conformance requirements

This spec assumes that HTML elements are in the http://www.w3.org/1999/xhtml namespace, as required by HTML5.

What authors are allowed to do should probably be constrained, and UAs should perhaps ignore some roles or states in certain cases.

All diagrams, examples, and notes in this specification are non-normative, as are all sections explicitly marked non-normative. Everything else in this specification is normative.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in the normative parts of this document are to be interpreted as described in RFC2119. For readability, these words do not appear in all uppercase letters in this specification. [RFC2119]

1.1. Dependencies

DOM

Implementations must support some version of DOM Core, because this specification is defined in terms of the DOM. [DOM3CORE]

2. The role attributes

2.1. Authoring requirements

Authors may specify a role attribute in no namespace on any element in the http://www.w3.org/1999/xhtml or http://www.w3.org/2000/svg namespace.

The value of these attributes must be an ordered set of space-separated tokens where each token must be a valid role token. For accessibility-related roles, the first supported role will be used; subsequent roles act as fallback roles. [HTML5]

A valid role token is one of the following:

The following snippet shows how role can be used in HTML:

<div role="checkbox" tabindex="0"></div>

The folowing snippet shows how it can be used in XHTML and SVG:

<html xmlns="http://www.w3.org/1999/xhtml">
 ...
  <div role="checkbox" tabindex="0"/>
  <svg xmlns="http://www.w3.org/2000/svg">
   <circle role="checkbox" focusable="true"/>
   ...

2.2. UA requirements

UAs must process the value of a role attribute in no namespace that is part of an element in the http://www.w3.org/1999/xhtml or http://www.w3.org/2000/svg namespace as described below.

The following algorithm will return the role identifier:

  1. Let tokens be the result of splitting the string on spaces. [HTML5]

  2. For each token in tokens:

    1. If token is a role as defined in WAI-ARIA Roles, then return token and abort these steps. [ROLES]

    2. If token is a supported custom role that is supposed to map to an accessibility API, then return token and abort these steps.

  3. Return the empty string.

UAs must expose the entire value of the attribute as a string to the AT using accessibility API specific methods, unless the role identifier is presentation and the element on which the attribute is specified is not focusable. UAs should also map the role identifier to an accessibility API specific role, if there is one. [MAPPING]

Find out what that actually means and define it.

When the role identifier is the empty string, it won't map to anything.

3. States and Properties

3.1. Authoring requirements

Authors may specify a state or property propertyname (as defined in WAI-ARIA States and Properties) by specifying an attribute aria-propertyname in no namespace on an element in the http://www.w3.org/1999/xhtml or http://www.w3.org/2000/svg namespace. [STATES]

The value of these attributes must be one of the allowed values of the state or property propertyname (as defined in WAI-ARIA States and Properties). [STATES]

The following snippet shows how states and properties can be declared in HTML:

<div aria-hidden="true">...</div>

The following snippet shows how they can be declared in XHTML and SVG:

<html xmlns="http://www.w3.org/1999/xhtml">
 ...
  <div aria-hidden="true">...</div>
  <svg xmlns="http://www.w3.org/2000/svg">
   <g aria-hidden="true">...</g>

3.2. UA requirements

UAs must process an aria-propertyname attribute in no namespace that is part of an element in the http://www.w3.org/1999/xhtml or http://www.w3.org/2000/svg namespace as described below.

  1. Map propertyname to an accessibility API specific attribute, if any, and pass along the value. [MAPPING]

References

[MODULE]
   http://www.w3.org/TR/2007/WD-xhtml-role-20071004/

[CURIE]
   http://www.w3.org/TR/2007/WD-xhtml-role-20071004/#sec_3.1.1. (for now)

[ROLES]
   http://www.w3.org/WAI/PF/Group/GUI/ (Member-only)
   or http://www.w3.org/TR/2007/WD-aria-role-20070601/

[STATES]
   http://www.w3.org/WAI/PF/Group/adaptable/ (Member-only)
   or http://www.w3.org/TR/2007/WD-aria-state-20070601/

[MAPPING]
   http://developer.mozilla.org/en/docs/aria-to_API_mapping

[XMLNS]
   http://www.w3.org/TR/2006/REC-xml-names-20060816/

[HTML5]
   http://www.whatwg.org/specs/web-apps/current-work/multipage/

[DOM3Core]
   http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/

[RFC2119]
   http://www.ietf.org/rfc/rfc2119.txt

Acknowledgements

Thanks to Al Gilman, Anne van Kesteren, Dave Raggett, Doug Schepers, Henri Sivonen, Ian Hickson, Maciej Stachowiak, Mark Birbeck, and Richard Schwerdtfeger for their useful and substantial comments.