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
WCAG Compliance #566
Comments
Just circling back to this - now that maintenance is more active, I do want to really emphasize our approach to accessibility. Going to pin this issue - would love to have more people chime in! (I'm happy to work on this, and in particular tweak our defaults; would like more maintainer input, particularly from those with backgrounds in design) |
In addition to the contrast issue, which as noted are relatively easily solvable, I've currently noted two additional issues I think would be great to see addressed (and I'm not opposed to putting engineering resources into resolving them if the maintainers are interested).
The specific wording is my example is bit awkward, but something like that is one possible way to resolve that. (svg title is just one option and others could be considered if that isn't desired. It seemed the easiest way to address this with my limited knowledge of the code base.
If the maintainers would be interested in working through these issues together, I'd be happy to provide Pull Requests to discuss options further over code. |
Hi @JPrevost, thanks for making your comment! I agree that these are both things we should resolve. I would certainly be open for a PR for either! Re: Re: tab order, I'll have to think about it a bit more, but an exploratory PR is a great idea! |
Why are these changes being introduced: * The current links to show/hide the nested pages use a visual only svg image with no accessible affordance provided so screenreaders will not be able to provide appropriate context for users as to what they should expect when clicking these links * You can see the problem by running a tool like ANDI on the current main branch of this repository and then running it again on this branch. ANDI shows what a screenreader would read. * You can also use a tool like Voiceover to hear the importance of what this introduces to users that use that technology. Before this change, Voiceover would read all of these navigation links as "link image just-the-docs" but with this change it will read `link image toggle links in <categoryName> category` Relevant ticket(s): * This was discussed as part of the larger WCAG compliance ticket just-the-docs#566 How does this address that need: * This adds an `aria-label` to the link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label Document any side effects to this change: It appears it might be prefereable to use `aria-labelledby` whenever possible, but from what I can tell these links are just the visual cue of the svg with no other affordance given to users to understand what they'll do so there is nothing to point `aria-labelledby` at. An `svg` title was considered, but in reading more about it it seemed like `aria-label` was more appropriate as it puts the label on the `a` rather than the `svg` which feels more accurate. * https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby
Why are these changes being introduced: * The current tab order requires keyboard or screenreader users to tab though all of the navigation links before they get to the main content of the page Relevant ticket(s): * Discussed as part of larger WCAG ticket just-the-docs#566 How does this address that need: * Introduces an off screen link as the first element in the tab order that will display when it has focus but remain off screen for users not using tab to navigate the document. * Introduces a new scss file with the required style elements and uses colors variables to ensure both light and dark mode are respected. Background information on this technique: - https://www.w3.org/TR/WCAG20-TECHS/G1.html - https://accessibility.oit.ncsu.edu/it-accessibility-at-nc-state/developers/accessibility-handbook/mouse-and-keyboard-events/skip-to-main-content/
Adds accessible nav elements for nested pages Why are these changes being introduced: * The current links to show/hide the nested pages use a visual only svg image with no accessible affordance provided so screenreaders will not be able to provide appropriate context for users as to what they should expect when clicking these links * You can see the problem by running a tool like ANDI on the current main branch of this repository and then running it again on this branch. ANDI shows what a screenreader would read. * You can also use a tool like Voiceover to hear the importance of what this introduces to users that use that technology. Before this change, Voiceover would read all of these navigation links as "link image just-the-docs" but with this change it will read `link image toggle links in <categoryName> category` Relevant ticket(s): * This was discussed as part of the larger WCAG compliance ticket #566 How does this address that need: * This adds an `aria-label` to the link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label Document any side effects to this change: It appears it might be prefereable to use `aria-labelledby` whenever possible, but from what I can tell these links are just the visual cue of the svg with no other affordance given to users to understand what they'll do so there is nothing to point `aria-labelledby` at. An `svg` title was considered, but in reading more about it it seemed like `aria-label` was more appropriate as it puts the label on the `a` rather than the `svg` which feels more accurate. * https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby Co-authored-by: Matt Wang <matt@matthewwang.me>
Why are these changes being introduced: * The current tab order requires keyboard or screenreader users to tab though all of the navigation links before they get to the main content of the page Relevant ticket(s): * Discussed as part of larger WCAG ticket just-the-docs#566 How does this address that need: * Introduces an off screen link as the first element in the tab order that will display when it has focus but remain off screen for users not using tab to navigate the document. * Introduces a new scss file with the required style elements and uses colors variables to ensure both light and dark mode are respected. Background information on this technique: - https://www.w3.org/TR/WCAG20-TECHS/G1.html - https://accessibility.oit.ncsu.edu/it-accessibility-at-nc-state/developers/accessibility-handbook/mouse-and-keyboard-events/skip-to-main-content/
Why are these changes being introduced: * The current tab order requires keyboard or screenreader users to tab though all of the navigation links before they get to the main content of the page Relevant ticket(s): * Discussed as part of larger WCAG ticket #566 How does this address that need: * Introduces an off screen link as the first element in the tab order that will display when it has focus but remain off screen for users not using tab to navigate the document. * Introduces a new scss file with the required style elements and uses colors variables to ensure both light and dark mode are respected. Background information on this technique: - https://www.w3.org/TR/WCAG20-TECHS/G1.html - https://accessibility.oit.ncsu.edu/it-accessibility-at-nc-state/developers/accessibility-handbook/mouse-and-keyboard-events/skip-to-main-content/
I'm finding this theme to be very capable. However, one thing that presents an issue is that the built-in styling generates errors when evaluating for WCAG compliance (you can analyze the Just the Docs pages with something like the WAVE plugin for a quick read). With WACG 2.2 coming out later in 2021, there will probably be renewed attention to accessibility issues and, for larger organizations in many countries, compliance with 2.1 is already mandated.
Overall, the default style has a lot of positives: structural elements are strong, keyboard nav works, etc. The chief area for improvement seems to be contrast. It shows up in several areas, including code blocks, labels, buttons.
Obviously, I can (and will) modify SCSS to address this on my site, but it might be worth looking at tweaking the default variables and elements to be WCAG-friendly out of the box. That way Just the Docs users create more accessible sites without having to be well-versed in standards.
Thanks for considering this.
The text was updated successfully, but these errors were encountered: