accname icon indicating copy to clipboard operation
accname copied to clipboard

Accessible name calc doesn't clearly say what happens with invalid reference or empty

Open jnurthen opened this issue 7 years ago • 5 comments

From @mraccess77 on January 25, 2017 17:20

if computing a name, and 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:

First part: The term "non-empty aria-labelledby" attribute is not clear. Are you talking about an empty aria-labeleldby or aria-labelledby that points to something that is empty?

Second part: Even if it's implied that an invalid reference would then have an empty result -- it should clearly say valid aria-labelledby reference. Some would argue that an invalid reference passes and then we'd have an empty acc name. What should happen with an invalid reference is that the logic should proceed to the next step and get the acc name from something else if available -- it shouldn't stop.

Copied from original issue: w3c/aria#515

jnurthen avatar May 30 '18 22:05 jnurthen

From @klown on January 27, 2017 21:45

Proposed edit:

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

jnurthen avatar May 30 '18 22:05 jnurthen

From @mraccess77 on January 30, 2017 0:5

@klown that is better. But I still worry about "aria-labelledby is not empty" -- perhaps "If computing a name, and the result calculated by the current node's aria-labelledby attribute is non-empty..."

jnurthen avatar May 30 '18 22:05 jnurthen

From @mraccess77 on January 30, 2017 0:10

Also the term "non-empty" is confusing. Is " " non-empty? For example, in the Chrome developer tools has an accessible name of " ". has an accessible name of "test". Is this what was intended by the name calculation? It's fine with me if it does -- but we need to document the intention of these edge cases and be clear.

jnurthen avatar May 30 '18 22:05 jnurthen

From @klown on February 6, 2017 20:40

@mraccess77 wrote:

... But I still worry about "aria-labelledby is not empty"

Technically, aria-labelledby is specified to take one or more IDREFs as its value. Anything else is invalid, including the empty string. I suggest dropping the term "non-empty" completely:

""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 the IDREFs in the order they occur: ..."

jnurthen avatar May 30 '18 22:05 jnurthen

What is a valid IDREF? Is it valid if there is no element with that id?

Then

Set the current node to the node referenced by the IDREF.

It is not defined what this means.

zcorpan avatar Feb 28 '19 11:02 zcorpan