-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review and either confirm, remove, or fix "recursive/traversal" tests in ./accname/name/comp_name_from_content.html due to outstanding AccName issues #123
Comments
FYI @MelSumner @accdc |
Will you help review the source of the AccName traversal tests (lines 210–253) and make sure you don't notice anything unexpected? |
Thanks for pinging me about this, it’s difficult at times to keep track of everything. “This use of the term "recursion" is not actually referring to recursion... so that portion of the AccName algo should be renamed.” I’m not sure how this should be renamed. My understanding is that name from content causes the current node to traverse within the container that supports name from content. If I’m misunderstanding, please let me know. Also, if you have a recommended wording that would be clearer, please let me know. “There is still a conflict in AccName regarding aria-label and traversal on generics.” I’m not sure where the conflict is within AccName for this. The AccName spec doesn’t specify that generic roles should not be processed when being traversed, only that the “current node” should be processed when running through child nodes. Personally I don’t recommend adding more complexity to the process by singling out specific roles as not being valid for naming. Even the use of role=”none” on an element isn’t sufficient to prevent a name from being exposed when using aria-label. In the case of an average developer, most will never know which elements are implicitly generic and why in accordance with the ARIA spec, and this will only lead to more confusion and unreliable naming practices across the web. Also, prior to the addition of the generic role, the use of aria-label on a div or span was an excepted and supported practice, so doing this will retroactively break all such implementations everywhere across the web if this is done. To be clear, I’m not saying that a basic div or span should be namable by themselves. I am only saying that when a div or span is encountered when compiling the accessible name of an ancestor role, such as a heading or link or button or anything else, it should return the value of aria-label if found just like it does with all other roles that are not widgets with values. “The parent issue of both of these is also related to traversal discrepancies.” Apologies, it’s been a long day, can you clarify this one? Thanks, |
I think the term "traversal" is fine... "recursion" is not because it does not recursively traverse. |
By my reading of the current spec, the last two tests here have incorrect expectations. The disagreement lies in the applicability of the spec note "Each node in the subtree is consulted only once." That's an unambiguous sentence, and it sits in the Name From Content section. I think a reasonable interpretation is that, since we already consulted a node via an aria-labelledby traversal, we shouldn't consult it again. Those last two tests consult the same node twice. Notably, consulting only once is the expectation of the second test in this group. We consult I do think the spec could be clearer, and I don't know that my interpretation of it is actually what's reasonable UA behavior from an author perspective. Regardless, if we take it as written, I think we should adjust the expectations of the last two tests to avoid the double-consulting, or move them to tentative files. I think the other tests are correct. Below, I've included my step-by-step breakdown of following the Acc Name spec for each test. Please do correct me if I'm getting something wrong here. 1. heading with nested link with nested image using aria-labelledby<h3 data-expectedlabel="heading image heading" data-testname="heading name from content for each child including nested link using aria-labelledby with nested image" class="ex">
heading
<a href="#" aria-labelledby="nested_image_label1">
ignored link text
<img id="nested_image_label1" alt="image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
ignored link text
</a>
heading
</h3>
2. heading with two nested links referencing image using aria-labelledby<h3 data-expectedlabel="image link2 link3" data-testname="heading name from content for each child including two nested links using aria-labelledby with nested image" class="ex">
<a href="#" aria-labelledby="nested_image_label2">
link1
</a>
<a href="#" data-expectedlabel="link2 image link3" data-testname="link name from content for each child including nested image (referenced elsewhere via labelledby)" class="ex">
link2
<img id="nested_image_label2" alt="image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
link3
</a>
</h3> computing name of
|
I agree with @nmlapre's analysis here. It looks like |
The following ambiguities in AccName were discovered while writing WPT tests for the (misnomer) "recursion" portions of "name from content." After some healthy discussion, the following issues are still unresolved:
I am adding this tracker because the above issues have not yet been resolved in AccName. Due to this, the Interop Accessibility contributors should carefully re-review the source of the AccName traversal tests (lines 210–253), and potentially remove, resolve, or move them to a tentative file if needed. I have a sneaking suspicion that a bogus test may remain here in Interop 2024.
The text was updated successfully, but these errors were encountered: