-
Notifications
You must be signed in to change notification settings - Fork 23
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
Links that include header elements omit their descendant content from the link's accessible name #226
Comments
So a structure like this:
Should the accessible name be just "Read about it" or should the elements in the header contribute text as well? Voiceover seems to just read the span at the end while Jaws and NVDA read it all when tabbed to but presents as three links when arrowing through. Chrome's accessibility tab says the link has an accessible name of "Read about it". |
Related: #120 |
Hi, in this case the result would be accName: "Read about it" The reason why is because header in this case maps to role="banner" in the accessibility tree, and banner is a landmark region that does not support "name from content" in accordance with the ARIA spec. This relates to the implicit mapping section at: header In contrast, if role=generic is applied according to these rules, then the header content should be parsed. The generic role should always be traversed, otherwise content from divs and spans would not be parsed either. There isn't anything in the AccName spec that would specifically prevent header from being parsed as part of the recursion algorithm. It gets complicated when implicit mappings change the perceived role of an element, though this is handled as part of a different spec. |
Hi Bryan, thanks for that detail - In the case we are finding it the anchor is a descendant of an article, section, and aside (all 3) and it is not working as expected with the acc name calc prototype or Chrome's accessible name calculation. So it seems like this nuance is not being picked up consistently. |
Thanks, we discussed this today in the ARIA meeting, and it is related to the issue filed against ARIA I've agendad the original AccName traversal issue so we can hopefully get some traction on this soon. |
Related: w3c/aria#1860 |
@mraccess77 |
Chris Blouch provided the example above I was referring to. Thanks. |
The example I provided on January 23 was found in the wild and was originally inside an Aside element. So if that changes things, the more complete markup would be:
The same site had the same Anchor structure inside an Article element as well and exhibited the same behavior. Both the Aside and Article elements were children of a Section element. |
If you have a link with href attribute and the link contains a header element and other sibling elements such as a span or div - the content within the descendants of the header is not included in the name from content of the link while the text content from other elements are included in implementations of the accessible name calculation. Browser's like Chrome omit this content but some screen readers announce it - so it seems like there is inconsistent implementation of how to handle this situation. It would be good to get clarity on if the text within the header should be used.
The text was updated successfully, but these errors were encountered: