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:
or, if computing a description, and the current node has an aria-describedby attribute that contains at least one valid IDREF, and the current node is not already part of an aria-describedby traversal, process its IDREFs in the order they occur:
i. Set the accumulated text to the empty string.
ii. For each IDREF:
a. Set the current node to the node referenced by the IDREF.
b. Compute the text alternative of the current node beginning with step 2. Set the result to that text alternative.
c. Append the result, with a space, to the accumulated text.
iii. Return the accumulated text.
So the sub-bullets of the main second bullet (description computation) seems as if they are intended to apply to the first bullet as well (name computation). But they aren't formatted that way, so it looks like they only apply to the description sub-bullet. I was thinking the following could be simplified:
Otherwise:
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:
or, if computing a description, and the current node has an aria-describedby attribute that contains at least one valid IDREF,
Could be changed to:
Otherwise, if the current node referenced one or more IDREFs relevant to the computation type (aria-labelledby for name computation and aria-describedby for description computation), and the current node was not previously referenced in the traversal, process its IDREFs in the order they occur:
Then the sub-bullets (i through iii) would apply to this single reference.
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, or
or, if computing a description, and the current node has an aria-describedby attribute that contains at least one valid IDREF, and the current node is not already part of an aria-describedby traversal.
…then process the IDREFs in the order they occur:
i. Set the accumulated text to the empty string.
ii. For each IDREF:
a. Set the current node to the node referenced by the IDREF.
b. Compute the text alternative of the current node beginning with step 2. Set the result to that text alternative.
c. Append the result, with a space, to the accumulated text.
AccName Computation Step 2B is:
Otherwise:
So the sub-bullets of the main second bullet (description computation) seems as if they are intended to apply to the first bullet as well (name computation). But they aren't formatted that way, so it looks like they only apply to the description sub-bullet. I was thinking the following could be simplified:
Could be changed to:
Then the sub-bullets (i through iii) would apply to this single reference.