From HTML WG Wiki
Provide a definition of the role attribute and defer to WAI-ARIA where appropriate
HTML5 must define the ARIA
role="" attribute itself as the WAI-ARIA specification fails to do so.
This is for ISSUE-199 (aria-processing).
Definition of the ARIA role attribute
WAI-ARIA does not itself define a
role="" attribute—instead, it expects each WAI-ARIA host language to define such an attribute. HTML does not currently provide a definition of its ARIA
role="" attribute, so fails to hook into the WAI-ARIA specification correctly.
The purpose of the ARIA
role="" attribute is for authors to set a WAI-ARIA role on an element. It is not a general-purpose attribute for imbuing elements with additional semantics. (HTML already has such an attribute—the
class="" attribute.) Thus, the definition of the ARIA
role="" attribute in the HTML spec should restrict its semantics and use solely to WAI-ARIA roles.
While the Add role attribute and enhance ARIA lexical processing guidance Change Proposal provides a definition of the ARIA
role="" attribute, the definition provided can be construed as overly broad. It says "the role attribute describes the role the current element plays[…] The attribute describes the role(s) the current element plays in the context of the document. This can be used, for example, by applications and assistive technologies to determine the purpose of an element." This text does not make it clear that the ARIA
role="" attribute is restricted to WAI-ARIA roles.
Several paragraphs later, the proposed spec addition contradicts that earlier section, and claims that "all possible tokens should be considered reserved for future versions of ARIA, and authors SHOULD NOT use the role attribute to provide semantics not defined by ARIA." Were we to adopt that proposed text, we would be introducing internal contradictions to the HTML specification.
Including WAI-ARIA state and property attributes by reference
In addition to providing a definition of the ARIA
role="" attribute, the Add role attribute and enhance ARIA lexical processing guidance Change Proposal suggests that we add a new section to the HTML spec duplicating the definitions of all the WAI-ARIA state and property attributes. This is a basic violation of Don't Repeat Yourself: by duplicating these definitions, we introduce a host of potential specification errors and synchronization troubles. We should leave the definition of these attributes to the WAI-ARIA group and include them by reference, in the same way and for the same reasons as our transclusion of the SVG and MathML vocabularies.
A multitude of other issues with one of the other Change Proposals
As described by the Editor in this email, the Add role attribute and enhance ARIA lexical processing guidance Change Proposal has a variety of other problems which make it unsuitable for adoption by this working group.
Add a definition of the ARIA
role="" attribute in the Global Attributes section of the spec. A sample diff is provided; the Editor is free to make any substantially equivalent edit which provides such an attribute definition.
Index: source =================================================================== --- source (revision 7028) +++ source (working copy) @@ -12145,6 +12145,31 @@ + <h5 id="roles">The ARIA <dfn title="attr-aria-role"><code>role</code></dfn> attribute</h5> + + <p>Every <span title="HTML elements">HTML element</span> may have an + ARIA <code title="attr-aria-role">role</code> attribute specified. + This is a <span>Role attribute</span> as defined by the Accessible + Rich Internet Applications (WAI-ARIA) specification. <a + href="#refsARIA">[ARIA]</a></p> + + <p>The attribute, if specified, must have a value that is a <span>set + of space-separated tokens</span> representing the various WAI-ARIA + roles that the element belongs to.</p> + + <div class="impl"> + + <p>The WAI-ARIA role that an <span title="HTML elements">HTML + element</span> has assigned to it is the first non-abstract role found + in the list of values generated when the <code + title="attr-aria-role">role</code> attribute is <span title="split a + string on spaces">split on spaces</span>. <a + href="#refsARIA">[ARIA]</a></p> + + </div> + + + <h5>The <dfn title="attr-style"><code>style</code></dfn> attribute</h5> <p>All <span>HTML elements</span> may have the <code
No additional change is requried; the specification already pulls in WAI-ARIA state and property attributes by reference.
- Avoid unnecessary and error-prone duplication of WAI-ARIA spec content
- Define the ARIA
role=""attribute in a way that unambiguously restricts its use to decorating HTML elements with WAI-ARIA roles.
- Allows forward compatibility by leaving the list of valid WAI-ARIA roles in the hands of the WAI-ARIA working group.
- Spec readers have to follow the reference to the WAI-ARIA specification in order to find out the meaning of WAI-ARIA state and property attributes.
Conformance Classes Changes