RE: Accname question regarding self-references

Hi,
Personally, I think that all of these are slightly wrong.

All of this is contingent on the difference between what is considered the root node versus the current node, and how the algorithm handles one over the other.

Here is what the spec states prior to the algorithm within the definition section.

Root node
The DOM node or element<https://dom.spec.whatwg.org/#concept-element> for which the text alternative is sought.
Current node
The DOM node currently traversed to compute the root node's text equivalent. Initially, the current node is the root node, but at later stages is either some descendant of the root node, or another referenced node.
Flat string
A string of characters where all carriage returns, newlines, tabs, and form-feeds are replaced with a single space, and multiple spaces are reduced to a single space. The string contains only character data; it does not contain any markup.
Total accumulated text
The text equivalent computed up to, but not including the current node.
Accumulated text
Text accumulated at a step or sequence of steps described below. It is temporary storage for those steps.

The relevant part here is this: Total accumulated text: “The text equivalent computed up to, but not including the current node.”

So, the root node starts out as both root node and current node, and is disqualified from parsing itself during the iteration process because according to the spec, a DOM node can only be processed once and not at any other time within the same recursive process, so the self-reference is ignored because the root node has already been processed when it was also the ‘current node’.

In this case, only the content of the span would be set as the accessible name.

Even if it were interpreted that the subsequent labelledby self-reference should include the value, it could not because the root node has already been traversed when it was also the current node and it cannot be processed more than once even when referenced by other nodes elsewhere within the same recursion process.

Does this make sense?



Bryan Garaventa
Principal Accessibility Architect
Level Access, Inc.
Bryan.Garaventa@LevelAccess.com<mailto:Bryan.Garaventa@LevelAccess.com>
415.624.2709 (o)
www.LevelAccess.com<http://www.levelaccess.com/>

From: James Nurthen <nurthen@adobe.com>
Sent: Monday, January 4, 2021 5:30 PM
To: ARIA Working Group <public-aria@w3.org>
Subject: Accname question regarding self-references

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

We are having a debate in a Chrome issue about the following.

According to the accessible name algorithm what should be the accessible name of the input in the below

<span id="label">The Label</span>
<input id="input" aria-label="ariaLabel" aria-labelledby="label input" value="the value">

Choices

  1.  “The label ariaLabel”
  2.  “The label the value”
  3.  “The label ariaLabel the value”
  4.  Something else…


James Nurthen (he/him)
Accessibility engineer
T 415 832 2734
nurthen@adobe.com<mailto:nurthen@adobe.com>
[Adobe]

Received on Tuesday, 5 January 2021 19:46:23 UTC