Clarify what an "empty" aria-labelledby attribute/property is, especially for the purposes of accessible name computation

This is a message in a bottle about:

Accessible Rich Internet Applications (WAI-ARIA) 1.0
Editors' Draft 7 May 2012
Accessed: 2012-05-31
§5.2.7. Accessible Name Calculation
http://www.w3.org/WAI/PF/aria/roles#namecalculation
WebCite archive: http://www.webcitation.org/683vxMJNo

and

WAI-ARIA 1.0 User Agent Implementation Guide
Editors' Draft 11 May 2012
§5.6.1.3. Text Alternative Computation
http://www.w3.org/WAI.new/PF/aria-implementation/#mapping_additional_nd_te
Accessed: 2012-05-31
WebCite archive: http://www.webcitation.org/683voyd7H

The text alternative computation algorithm, repeated verbatim in these
two specifications, talks about @aria-labelledby being "empty". It
turns out this phrasing is ambiguous and readers are not clear whether
the spec means the algorithm is referring to the text alternative
calculated via the attribute or the value of the attribute. Evidence
of reader confusion:

   http://lists.w3.org/Archives/Public/w3c-wai-ig/2012AprJun/0146.html

Not sure why the algorithm is discussing _attributes_ (properly the
remit of host languages) rather than _properties_ (properly the remit
of ARIA) here but anyways…

WAI-ARIA defines the type of the @aria-labelledby property as "ID
reference list" (§6.6), "ID reference list" as a "list of one or more
ID references", and "ID reference" as a "[r]eference to the ID of
another element in the same document" (§6.4).

    http://www.w3.org/WAI/PF/aria/states_and_properties#aria-labelledby

    http://www.w3.org/WAI/PF/aria/states_and_properties#propcharacteristic_value

Consequently, conforming documents cannot set the @aria-labelledby
property to an empty list or include references to elements that are
not in the same document.

WAI-ARIA should either define what happens in these cases or require
host languages to ensure that the property mapped from their markup is
conforming in this respect, even the markup is not conforming.

For example, what should happen if @aria-labelledby is a list of three
ID references, and the second reference is to an element that is not
in the same document?

The progressive rendering of documents must be accounted for here,
since elements might be parsed or inserted by script later in the
markup of the same document. HTTP server push implies progressive
rendering could take some time - what should user agents do when asked
to yield an @aria-labelledby property?

WAI-ARIA should clarify the text computation algorithm to make it
clear whether it is talking about the @aria-labelledby property being
set to an empty list or about the text alternative calculated via its
list. For example, with the markup:

<label for="i">Name</label><input id="i" aria-labelledby="e"><div id="e"></div>

Is the accessible name of the input "Name" or the the empty string?

--
Benjamin Hawkes-Lewis

Received on Thursday, 31 May 2012 04:57:54 UTC