-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Accessibility: aria region around skiplink is superfluous #8418
Comments
cc @JoshuaKGoldberg @BenDMyers The reasoning here makes a lot of sense to me but would love to hear your ideas on this. |
Agreed this region is superfluous, and would lead to unnecessarily cluttered announcements when users navigate to it with a screenreader. Doing a quick Google to see if there's recommendations for where the skip link should go and which roles it should have turns up a few interesting results:
—Deque University's All page content must be contained by landmarks rule
—GOV.UK Design System skip link component, with more discussion in a GitHub issue
—Andrew MacPherson in an issue filed against Drupal, articulating much the same as @timveld Given that Deque and GOV.UK Design System in particular advise against having skip links in landmarks, I'm inclined to remove the region and have the skip link be a direct child of Note: This isn't a neutral decision free of impact. While the experience will likely be better for screenreader users, the skip link not being in a landmark will get flagged as a false positive on every Docusaurus site. This may cause churn in organizations with accessibility auditing practices that involve automated testing, and this could lead to more issues being filed against the Docusaurus project. |
Thanks Honestly, I don't have the a11y skills to understand what should be done here 😅 Considering this was only added recently and only @JoshuaKGoldberg reported it, we shouldn't get too many reports 🤞 Maybe we could also reach out to Axe and see what they think of this case? https://dequeuniversity.com/rules/axe/4.1/region
excepting skip links: so I guess the Axe rule shouldn't apply here, but maybe they can't detect this edge-case properly? 🤔 |
I'm definitely on the side of favoring real experiences over automated tools. I've been diving into issues on the axe-core repo since my last comment, and it seems like axe-core already tries to intuit which links are skip links and exempt them from the regions rule as is. I think their heuristics generally depend on the skiplinks having an in-page fragment for an href. I'm not entirely sure why @JoshuaKGoldberg got a warning about this, but I wonder if the fallback hash changes from #6411/#8204 since might have made it so Docusaurus skiplinks would now pass Axe checks if revalidated. If so, that's a major vector of automated accessibility scans you wouldn't have to worry about. Chances are, other non-Axe automated accessibility scanning tools might still flag this as false positives, but I think the churn would be much less since Axe is so popular. |
Ah yes I just reported #6252 originally because aXe was reporting. It sounds like my report was erroneous - that I should have reported a false positive to aXe. |
Accepting a PR from whoever is confident about what to change 😄 |
Interesting discussion. Most screen reader users will not notice the difference between the skiplink being "on its own" or in the header region. And I see no strong objective ground (in WCAG or elsewhere) for favoring one option over the other. So I think we just have to make a design choice. Looking at other websites, most websites put the skiplink "on its own" (e.g. gov.uk, microsoft.com). Deque.com does put it in the header, but they seem to be an exception to the generally accepted best practice. This is all the more dubious given the quote from Deque university mentioned above, which includes the words "excepting skiplinks". As this confusion is the result of Deque's rule and their apparent inconsistent application of that rule, I agree with the suggestion of asking Deque for their input. Therefore, I will contact Deque and ask them to reply in this thread (or I will summarize the reply I get from them here). |
Thanks @timveld, we appreciate your inputs on a11y issues :) |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
In issue #6252, an aria region with the label "skip to main content" was placed around the "skip to main content" 'skiplink' which appears at the top of every docusaurus-generated page.
This was done in response to automated accessibility testing tools reporting that all page content should be contained in an aria region.
I agree that the skiplink should be contained in an aria region, but creating a dedicated aria region for the skiplink is a regression from a screen reader user's perspective.
Aria reagions are used to divide the page into multiple blocks of content in order to facilitate easy navigation between such blocks of content by screen reader users. Note that I say blocks, not single elements. If a page were cluttered with regions containing only one or two elements, the value of using aria live regions (i.e. the ability to quickly skip a lot of clutter and 'skim' the page on a high level) is quickly lost.
More importantly, superfluous regions (particularly those with long labels) contribute to information overload which is a major issue when working with a complex website using a screen reader. To understand the problem I'll quote my screen reader's speech output:
In summary: this region not only doubles the number of words I have to listen to, but also introduces a line break to my "view" of the page.
Long story short:
Reproducible demo
No response
Steps to reproduce
Use any docusaurus-generated page with a screen reader
Expected behavior
Skiplink is contained within the aria banner region
Actual behavior
Skiplink has a dedicated aria region, complicating navigation and causing screen readers to read a lot of superfluous information
Your environment
Self-service
The text was updated successfully, but these errors were encountered: