accname icon indicating copy to clipboard operation
accname copied to clipboard

Question on implicit label and TAC

Open devarshipant opened this issue 7 years ago • 1 comments

In the following code snippet regarding an implicit label, what would the total accumulated text based on TAC be?

<label for="nam" id="first">
<input id="nam" type="checkbox" aria-labelledby="first sup1 sup2">
  Name
  <br>
  <div id="sup1">First</div>
  <div id="sup2">Last</div>
  
  </label>

This is a depressing example as there are better techniques to code this checkbox with support text. Still, the algorithm should be able to handle it.

Would the total accumulated text be "Name First Last First Last" or "Name First Last"?

2.B says: "if computing a name, and the current node has an aria-labelledby attribute that contains at least one valid IDREF, and the current node is not already part of an aria-labelledby traversal, process its IDREFs in the order they occur..."

devarshipant avatar Oct 15 '18 16:10 devarshipant

Hi, I just ran this code against the current AccName algorithm prototype at https://github.com/WhatSock/w3c-alternative-text-computation

The test code being:

<label for="test" id="first">
<input id="test" type="checkbox" aria-labelledby="first sup1 sup2">
  Name
  <br>
  <div id="sup1">First</div>
  <div id="sup2">Last</div>  
  </label>

Result:

accName: "Name First Last"

This seems correct to me, because nodes that are processed by the algorithm are only supposed to be processed once, and not on subsequent iterations in accordance with the spec.

accdc avatar Jan 31 '19 23:01 accdc