- From: Alexander Surkov <surkov.alexander@gmail.com>
- Date: Wed, 29 Apr 2015 14:59:53 -0400
- To: Dominic Mazzoni <dmazzoni@google.com>
- Cc: "W3C WAI Protocols & Formats" <public-pfwg@w3.org>
- Message-ID: <CA+epNse8ZUauVuL=4X9h-7kGjMqSyN0YbXw8xaAN0yxr6_PpYw@mail.gmail.com>
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:00:20 UTC