W3C home > Mailing lists > Public > wai-xtech@w3.org > May 2012

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

From: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
Date: Thu, 31 May 2012 07:08:09 +0100
Message-ID: <CAEhSh3djQSZR-B4rWM4f=jGm8KQLJJNhQv5QCX_UKx9qSSPkgA@mail.gmail.com>
To: James Craig <jcraig@apple.com>
Cc: W3C WAI-XTECH <wai-xtech@w3.org>, James Nurthen <james.nurthen@oracle.com>
On Thu, May 31, 2012 at 6:30 AM, James Craig <jcraig@apple.com> wrote:
> Is there another way to use an IDREF to point outside the document?

Sorry for the confusion: I didn't mean to imply it could. I was just
trying distinguish the cases of "exists" (at time of query) and "in
the document" (which might not yet be fully parsed).

>> 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?
>
> The empty string. aria-labelledby trumps the native host language label mechanism, which in this case is [label@for/input@id]

It might be useful to include an example along those lines.

> As James Nurthen mentioned in the thread: http://lists.w3.org/Archives/Public/w3c-wai-ig/2012AprJun/0146.html
>>> It reads "if aria-labelledby or aria-label is empty or undefined". It does not mention anything about aria-labelledby pointing to a valid element which contains no content.
>
> I agree that we could clarify that prose a bit though. Perhaps "If *the attribute value of* aria-labelledby or aria-label is empty or undefined…"

Maybe that would be better, but …

   * aria-labelledby=" " is not an empty or undefined attribute value,
but should arguably be ignored for text alternative computation.
(Maybe define empty to imply whitespace trimming?)

   * DOM talks about "null" not "undefined" here
     http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-element-getattribute

--
Benjamin Hawkes-Lewis
Received on Thursday, 31 May 2012 06:08:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 31 May 2012 06:08:59 GMT