- From: Matthew King <mattking@us.ibm.com>
- Date: Wed, 29 Apr 2015 14:42:43 -0700
- To: James Nurthen <james.nurthen@oracle.com>
- Cc: public-pfwg@w3.org
- Message-Id: <201504292143.t3TLhaBl028446@d01av04.pok.ibm.com>
My understanding is that it recursively follows aria-labelledby until the "current node" either does not have labelledby or the reference became circular. It is not the easiest thing to follow though. It does say it is recursive in the descriptive text: "Text alternatives are built up, when appropriate, from all the relevant content contained within an element. This is accomplished via steps 2B and 2F, which are recursive, using the full set of rules to retrieve text from its own children or nodes it references." Matt King IBM Senior Technical Staff Member I/T Chief Accessibility Strategist IBM BT/CIO - Global Workforce and Web Process Enablement Phone: (503) 578-2329, Tie line: 731-7398 mattking@us.ibm.com From: James Nurthen <james.nurthen@oracle.com> To: public-pfwg@w3.org, Date: 04/29/2015 11:52 AM Subject: Re: aria-labelledby and recursion My reading has always been that you only don't follow the aria-labelledby traversal when the referenced node itself includes aria-labelledby, so for your first example the label for the input would be "Label 1" and for your 2nd it would be "Enter your Visa or Mastercard credit card number now". I guess if this is causing confusion the language needs to be tidied up - perhaps even with some more examples. Regards, James On 4/29/2015 11:44 AM, Dominic Mazzoni 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. -- Regards, James James Nurthen | Principal Engineer, Accessibility Phone: +1 650 506 6781 | Mobile: +1 415 987 1918 | Video: james.nurthen@oracle.com Oracle Corporate Architecture 500 Oracle Parkway | Redwood Cty, CA 94065 Oracle is committed to developing practices and products that help protect the environment
Attachments
Received on Wednesday, 29 April 2015 21:44:11 UTC