Re: aria-labelledby and recursion

If recursion was allowed then I think both of your examples should work.
But it appears that everybody is happy with current state of things, at
least I don't recall any requests to change that.

On Wed, Apr 29, 2015 at 3:07 PM, Dominic Mazzoni <dmazzoni@google.com>
wrote:

> Yeah, that's what I observed too when testing Firefox. Firefox doesn't
> recursively follow aria-labelledby in either my first or my second example.
>
> If it was intended that the second example should return "Enter your visa
> or mastercard credit card number now", then we should fix that in the spec.
> If we do that then I really don't understand why we wouldn't allow
> recursively following aria-labelledby in my first example too. Why make a
> distinction?
>
> If we don't intend for either case of recursion (i.e. we're happy with
> what Firefox does now), then the spec is basically correct and could just
> be clarified. I'd suggest that we fix the ARIA spec too so that web
> developers who read the spec for aria-labelledby understand that it does
> not get followed recursively.
>
>
> On Wed, Apr 29, 2015 at 11:59 AM, Alexander Surkov <
> surkov.alexander@gmail.com> wrote:
>
>> Apparently Firefox doesn't unwind recursive relation attributes and this
>> goes with the alg we follow [1]. I don't recall a decision background, but
>> I think that was done to keep things simple.
>>
>> [1]
>> http://asurkov.blogspot.ca/2012/11/accessilbe-firefox-text-equivalent.html
>>
>> On Wed, Apr 29, 2015 at 2:44 PM, Dominic Mazzoni <dmazzoni@google.com>
>> wrote:
>>
>>> Is aria-labelledby supposed to be allowed to be used recursively? For
>>> example:
>>>
>>> <input aria-labelledby="label1">
>>> <div id="label1" aria-labelledby="label2">Label 1</div>
>>> <div id="label2">Label 2</div>
>>>
>>> Is the computed name of the input element supposed to be Label 1 or
>>> Label 2? I thought it was supposed to be Label 2, but the spec (
>>> http://www.w3.org/TR/accname-aam-1.1/) says:
>>>
>>> "Otherwise, if the current node has a non-empty aria-labelledby
>>> attribute, and the current node is not already part of an aria-labelledby
>>> traversal, process its IDREFs in the order they occur:"
>>>
>>> That seems to imply that when you're part of an aria-labelledby
>>> traversal, you stop following the aria-labelledby attribute. Is that true,
>>> or is it misworded?
>>>
>>> Here's an even more subtle example:
>>>
>>> <input aria-labelledby="label1">
>>> <div id="label1">
>>>   Enter your
>>>     <img src="visa.png" aria-labelledby="visa">
>>>   or
>>>     <img src="mastercard.png" aria-labelledby="mastercard">
>>>   credit card number now.
>>> </div>
>>> <div hidden id="visa">Visa</div>
>>> <div hidden id="mastercard">Mastercard</div>
>>>
>>> I think as a web developer I'd be really surprised if the text for the
>>> label element itself was "Enter your visa or mastercard credit card number
>>> now" but the computed label for the input element was "Enter your or credit
>>> card number now" because aria-labelledby is not allowed to be followed
>>> recursively.
>>>
>>>
>>
>

Received on Wednesday, 29 April 2015 19:14:06 UTC