ARIA in HTML5 Integration: Document Conformance (Draft, Take Two)

This is not a spec and has not been endorsed by anyone.

Introduction

A week ago, I wrote a draft document and an accompanying email about integrating ARIA into HTML5 from the point of view of document conformance. I have gotten only one reply so far (almost Warnocked), so I figured I’d go ahead and implement my suggestions in order to produce something people can actually try. This document describes the implementation deployed at Validator.nu as of 2008-03-31.

The implementation is based on schemas written in RELAX NG and Schematron. DTDs, XSD, OWL or RDF Schema are not involved in any way.

HTML-isms in Attribute Values

When an attribute takes one of enumerated possible valid values, whitespace around the token is not allowed. The role attribute is considered to take an enumerated token value. (Now is not the time to cross the ARIA 2.0 extensibility bridge on the validation side.)

Enumerated values are not case-insensitive, however. They must be in lower case.

Numeric values use HTML5 microsyntaxes instead of XSD datatypes.

State and Property Groups for Implicit Roles

I identified the following implicit roles.

aria.implicit.button
aria-controls
aria.implicit.input
aria-controls, aria-invalid, aria-required
aria.implicit.region
aria-atomic, aria-busy, aria-channel, aria-controls, aria-expanded, aria-live, aria-relevant
aria.implicit.group
aria-atomic, aria-busy, aria-channel, aria-controls, aria-expanded, aria-live, aria-relevant, aria-activedescendant
aria.implicit.th
aria-sort, aria-atomic, aria-busy, aria-channel, aria-controls, aria-disabled, aria-expanded, aria-live, aria-readonly, aria-relevant, aria-selected
aria.implicit.structure
aria-atomic, aria-busy, aria-channel, aria-live, aria-relevant
aria.implicit.link
aria-controls, aria-disabled
aria.implicit.listitem
aria-posinset, aria-setsize, aria-atomic, aria-busy, aria-channel, aria-live, aria-relevant
aria.implicit.img
aria-atomic, aria-busy, aria-channel, aria-controls, aria-live, aria-relevant
aria.implicit.select
aria-invalid, aria-required, aria-atomic, aria-busy, aria-channel, aria-controls, aria-live, aria-relevant

Unsupported Roles

The following roles are unsupported. The first four duplicate ancient HTML 4.01 built-in semantics. Landmarks mostly duplicate HTML5 container elements.

Unsupported States and Properties

The following states and properties are not supported. (Links to rationale.)

Unsupported Requirements

The use of the group role is not properly specified. Moreover, an informative example in the spec and sample code from the University of Illinois disagree. Using group in trees or lists is not supported.

tab and tablist containment lacks reciprocity in the spec, so the validator only checks that the parent of a tab is tablist but checking for non-tab children of tablist is not supported.

Some grid-related containment rules are not checked, because I’m hopeful that the spec will change to use the natural structure of an HTML table.

The containment relationship of directory and link seems too strict and is not checked.

“Accessible Name Required” rules are not supported, because I didn’t get around to reviewing and implementing them yet.

Special—No Role Allowed

These elements do not accept a role attribute due to being special in some way.

Strong Native Role—No Override

The following elements have strong native semantics and to dissuade authors from overriding these native semantics, the following elements do not accept a role attribute. However, some of them accept states and properties according to the implicit role.

Handling button analogously with button input.

Element Implicit role Permitted States and Properties
address contentinfo aria.implicit.region
article ~main aria.implicit.region
aside note aria.implicit.region
audio
caption ~description aria.implicit.region
command type=radio menuitemradio
command type=checkbox menuitemcheckbox
datagrid treegrid
del
details region aria.implicit.region
dialog region aria.implicit.region
fieldset group aria.implicit.group
figure ~img aria.implicit.img
footer contentinfo aria.implicit.region
form region aria.implicit.region
h1—h6 heading aria.implicit.structure
header ~banner aria.implicit.region
hr separator Region properties make no sense for a canonically empty separator
input type=add button aria.implicit.button
input type=checkbox checkbox aria.implicit.button
input type=date spinbox+datatype aria.implicit.input
input type=datetime spinbox+datatype aria.implicit.input
input type=datetime-local spinbox+datatype aria.implicit.input
input type=email textbox+datatype aria.implicit.input
input type=file input aria.implicit.input
input type=month spinbox+datatype aria.implicit.input
input type=move-down button aria.implicit.button
input type=move-up button aria.implicit.button
input type=number spinbox aria.implicit.input
input type=password textbox+secret aria.implicit.input
input type=radio radio aria.implicit.input
input type=range slider aria.implicit.input
input type=remove button aria.implicit.button
input type=reset button aria.implicit.button
input type=submit button aria.implicit.button
input type=time spinbox+datatype aria.implicit.input
input type=url textbox+datatype aria.implicit.input
input type=week spinbox+datatype aria.implicit.input
ins
label ~description aria.implicit.region
legend ~description aria.implicit.region
li (in menu) menuitem not sure
mark
menu menu not sure
meter
nav navigation aria.implicit.region
option option aria.implicit.input
output region aria.implicit.region
progress progressbar
section region aria.implicit.region
select select aria.implicit.select
textarea textbox aria.implicit.input
th scope=row rowheader aria.implicit.th
th scope=col columnheader aria.implicit.th
time
video

Weak Native Role—Override Allowed

The following elements have an implicit role and accept states and properties according to that role. However, the native role can be overridden with the role attribute.

Element Implicit role Permitted States and Properties
body document aria.implicit.structure
a link aria.implicit.link
iframe region aria.implicit.region
input type=button button aria.implicit.button
input type=image button aria.implicit.button
input type=text textbox aria.implicit.input
ol list aria.implicit.region
ul list aria.implicit.region
li (in ol or ul) listitem aria.implicit.listitem

No Native Role—Any Role Allowed

The following elements have no states and properties by default but can accept any role using the role attribute.

Findings So Far

To find out how far out these made-up rules are from what people expect to do with ARIA, I validated the University of Illinois ARIA examples.

Changelog

  1. Made input type=image overridable
  2. Swapped the specialness of html and body