<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><html> <head> <title>ARIA Proposal</title> <link href="http://www.whatwg.org/style/specification" rel=stylesheet> <body class=draft> <div class=head> <h1 id=aria-proposal>ARIA Proposal</h1> <h2 class="no-num no-toc" id=work-in>Work in Progress — Last Update 22 October 2007</h2> 19 November 2007</h2> <dl> <dt>This version: <dd><a href="http://simon.html5.org/specs/aria-proposal">http://simon.html5.org/specs/aria-proposal</a> <dt>Latest version: <dd><a href="http://simon.html5.org/specs/aria-proposal">http://simon.html5.org/specs/aria-proposal</a> <dt>Previous versions: <dd><a href="http://lists.w3.org/Archives/Public/www-archive/2007Sep/att-0106/aria-proposal.html">http://lists.w3.org/Archives/Public/www-archive/2007Sep/att-0106/aria-proposal.html</a> <dt>Editor: <dd>Simon Pieters, Opera Software, simonp@opera.com <dt>Contributor: <dd>Aaron Leventhal, IBM, aleventh@us.ibm.com </dl> </div> <hr> <h2 class="no-num no-toc" id=abstract>Abstract</h2> <p>This proposal defines proper usage of ARIA markup for authors and ARIA markup processing for user agents for both (X)HTML and SVG. <h2 class="no-num no-toc" id=table>Table of Contents</h2> <!--begin-toc--> <ul class=toc> <li><a href="#conformance"><span class=secno>1. </span>Conformance requirements</a> <ul class=toc> <li><a href="#dependencies"><span class=secno>1.1. </span>Dependencies</a> </ul> <li><a href="#the-role"><span class=secno>2. </span>The <code>role</code> attributes</a> <ul class=toc> <li><a href="#authoring"><span class=secno>2.1. </span>Authoring requirements</a> <li><a href="#ua-requirements"><span class=secno>2.2. </span>UA requirements</a> </ul> <li><a href="#states"><span class=secno>3. </span>States and Properties</a> <ul class=toc> <li><a href="#authoring0"><span class=secno>3.1. </span>Authoring requirements</a> <li><a href="#ua-requirements0"><span class=secno>3.2. </span>UA requirements</a> </ul> <li class=no-num><a href="#references">References</a> <li class=no-num><a href="#acknowledgements">Acknowledgements</a> </ul> <!--end-toc--> <hr> <h2 id=conformance><span class=secno>1. </span>Conformance requirements</h2> <p class=big-issue>This spec assumes that HTML elements are in the <code>http://www.w3.org/1999/xhtml</code> namespace, as required by HTML5. <p class=big-issue>What authors are allowed to do should probably be constrained, and UAs should perhaps ignore some roles or states in certain cases. <p>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. <p>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] <h3 id=dependencies><span class=secno>1.1. </span>Dependencies</h3> <dl> <dt>DOM <dd> <p>Implementations must support some version of DOM Core, because this specification is defined in terms of the DOM. [DOM3CORE] </dl> <h2 id=the-role><span class=secno>2. </span>The <code>role</code> attributes</h2> <h3 id=authoring><span class=secno>2.1. </span>Authoring requirements</h3> <p>Authors may specify a <code>role</code> attribute in no namespace on any element in the <code>http://www.w3.org/1999/xhtml</code> or <code>http://www.w3.org/2000/svg</code> namespace. <p>The value of these attributes must be an <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/section-common1.html#ordered">ordered set of space-separated tokens</a> where each token must be a <a href="#valid">valid role token</a>. For accessibility-related roles, the first supported role will be used; subsequent roles act as fallback roles. [HTML5] <p>A <dfn id=valid>valid role token</dfn> is one of the following: <ul> <li> <p>A role as defined in WAI-ARIA Roles or XHTML Role Attribute Module. [ROLES] [MODULE] <li> <p>A CURIE whose prefix is not omitted. [CURIE] </ul> <div class=example> <p>The following snippet shows how <code>role</code> can be used in HTML: <pre><div role="checkbox" tabindex="0"></div></pre> <p>The folowing snippet shows how it can be used in XHTML and SVG: <pre><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"/> ...</pre> </div> <h3 id=ua-requirements><span class=secno>2.2. </span>UA requirements</h3> <p>UAs must process the value of a <code>role</code> attribute in no namespace that is part of an element in the <code>http://www.w3.org/1999/xhtml</code> or <code>http://www.w3.org/2000/svg</code> namespace as described below. <p>The following algorithm will return the <dfn id=role-identifier>role identifier</dfn>: <ol> <li> <p>Let <var>tokens</var> be the result of <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/section-common1.html#split" title="split a string on spaces">splitting the string on spaces</a>. [HTML5] <li> <p>For each <var>token</var> in <var>tokens</var>: <ol> <li> <p>If <var>token</var> is a role as defined in WAI-ARIA Roles, then return <var>token</var> and abort these steps. [ROLES] <li> <p>If <var>token</var> is a supported custom role that is supposed to map to an accessibility API, then return <var>token</var> and abort these steps. <p class=note>It is expected that AT vendors would introduce such custom roles. </ol> <li> <p>Return the empty string. </ol> <p>UAs must expose the entire value of the attribute as a string to the AT using accessibility API specific methods, unless the <a href="#role-identifier">role identifier</a> is <code>presentation</code> and the element on which the attribute is specified is not focusable. UAs should also map the <a href="#role-identifier">role identifier</a> to an accessibility API specific role, if there is one. [MAPPING] <p class=big-issue>Find out what that actually means and define it. <p class=note>When the <a href="#role-identifier">role identifier</a> is the empty string, it won't map to anything. <h2 id=states><span class=secno>3. </span>States and Properties</h2> <h3 id=authoring0><span class=secno>3.1. </span>Authoring requirements</h3> <p>Authors may specify a state or property <var>propertyname</var> (as defined in WAI-ARIA States and Properties) by specifying an attribute <code>aria-<var>propertyname</var></code> in no namespace on an element in the <code>http://www.w3.org/1999/xhtml</code> or <code>http://www.w3.org/2000/svg</code> namespace. [STATES] <p>The value of these attributes must be one of the allowed values of the state or property <var>propertyname</var> (as defined in WAI-ARIA States and Properties). [STATES] <div class=example> <p>The following snippet shows how states and properties can be declared in HTML: <pre><div aria-hidden="true">...</div></pre> <p>The following snippet shows how they can be declared in XHTML and SVG: <pre><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></pre> </div> <h3 id=ua-requirements0><span class=secno>3.2. </span>UA requirements</h3> <p>UAs must process an <code>aria-<var>propertyname</var></code> attribute in no namespace that is part of an element in the <code>http://www.w3.org/1999/xhtml</code> or <code>http://www.w3.org/2000/svg</code> namespace as described below. <ol> <li class=big-issue> <p>Map <var>propertyname</var> to an accessibility API specific attribute, if any, and pass along the value. [MAPPING] </ol> <h2 class=no-num id=references>References</h2> <pre class=big-issue>[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</pre> <h2 class=no-num id=acknowledgements>Acknowledgements</h2> <p>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.