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
Making Wagtail Accessible for users with disabilities #4199
Comments
Hey @mush42, thank you for reaching out and taking the time to write such a well thought-out issue. Making Wagtail accessible is something we care a lot about, even though I don't think we've stated it formally so far. Generally, I think what we need first and foremost is to be told what to do and to define some standards for current and future developments (and enforce them in pull request reviews). This could take the form of some documentation and/or automated tests. Then, there are the existing problems with the admin, where it would help us tremendously if you took the time to give us your take – and then helped us prioritise what to fix. The approach I would advise is:
You're more than welcome to make pull requests, but I imagine it would be quite an undertaking to fix everything. I would advise you to first define what to do – then it'll be easier for others to contribute too. Here are specific issues we're already aware of:
I've just added an Accessibility label to these, and we can use it for future issues as well. Finally, I should mention that we are in the process of changing the rich text editor within Wagtail from Hallo.js to Draftail. That is, don't bother auditing Hallo. And hopefully the new editor is better than the old one accessibility-wise. Thanks again for raising this. Personally making accessible software is something I care deeply about, and I'm super happy at the perspective that we could improve Wagtail's usability. |
Huge +1 for this. I'm hoping we can move to a more component based and documented front-end for Wagtail with some clear a11y requirements for component acceptance. Our biggest barrier to this at the moment is front-end input to Wagtail in general as it's a big task. |
I can help here if you're interested. Either testing or implementation. Got my focus on accessibility and can test on Windows NVDA, Android TalkBack and iOS VoiceOver. Also can share advanced techniques we got from accessibility audits made by third parties and tests with users. |
Hello all, I'm thrilled to receive such a positive feedback from the community, and feeling this strong passion for accessibility just make my hart bounce. So, lets start the real work, and brace your self for a rather lengthy comment! What to expect?In response to @thibaudcolas comment, I'll be listing the issues I'm facing while using Wagtail. The issues will be based on my personal experience as a user of assistive technology, so no automated accessibility testing will be involved. The issues will be mainly focused on managing the site and editing content in the admin interface. The issues will be divided into classes according to their severity and how much they impact the end-user experience. For instance, the (class-1) issues have the biggest impact on usability, (class-2) issues have lesser importance than (class-1) issues, but they are critical nonetheless. For each issue I'll write a brief description, list possible remedies, and link to additional resources from the web, in order to make this issue a reference for all subsequent issues. Technical DetailsWagtailI've installed the current version of Wagtail from Pypi, which at the time of writing is (1.13.1) into a virtual environment on a dual-core laptop running Microsoft Windows 10. The standard wagtail start command was used to create a new project, and Mozilla Firefox version 52-esr (extended support release) is being used to access the site's admin interface. Assistive TechnologyTo access my computer, I use NVDA, which is a free and open-source screen reader for the Microsoft Windows operating system. A free copy of NVDA can be downloaded from it's website at (http://www.nvaccess.org/). The recommended setup for accessibility testing and evaluation is NVDA + Firefox. But since the latter is going through a period of major revamping, it's current version (Firefox v. 57) doesn't play well with screen readers, so we resort to the ESR release. A Note on ChromeChrome has a built in accessibility checker in its developer tools, but I haven't used them, nor I use chrome in general. But I hear that it has an excellent level of support for assistive technologies on Windows. Note on references:At the end of each topic I'll list a number of articles for reference, while this is not necessary for simple bug fixes, it is important to read them before undertaking any large effert. Here is a list of sites and articles that are useful for any future work in the area of accessibility: General References
Tools
Accessibility Issues in Wagtail's AdminClass-1 Issues1. The Icon-Font:The icon font being used is very problematic for users of screen readers, because it uses actual letters and punctuations as place holders. While these letters are visually replaced by the real icons when the font is loaded, they are not hidden from screen readers. This makes it difficult to identify links and buttons when navigating the admin. For instance this is what I hear when I focus different links in the left sidebar:
Approaches to resolve this issue might include:
Instead of :
It could be:
And in javascript:
Additional resources regarding icon fonts and screen readers:
2. Navigating Page ContentTo explore the content of a web page, users of assistive technologies rely on two pieces of information:
Unfortunately, Wagtail doesn't score well on neither of those, this makes navigating the admin pages using a screen reader very cumbersome. Approaches to resolve this issue might include:
Additional readings on the importance of proper heading structure and landmarks: 3. Add textual labels to icon-only elementsSome actions on the admin are available as icon-only links, such as the ordering actions found in the table headers. In this case, the screen reader doesn't speak the name (label) of that link, so the user would not be able to identify what the link does. Approaches to resolve this issue might include:
It could be:
Additional readings on the importance of textual alternatives: 4. Proper Focus Management:Blind people rely entirely on the keyboard to access their system, so the mouse is out of the question. They use Tap and the arrow keys to find their way around, while the browser respond to these navigation commands by setting the keyboard focus on each element according to its tabindex. For custom components, focus management should be done programmatically using javascript. Consider the following scenarios:
Fixing this issue requires additional work in the client side code, specifically, prgramatical management of keyboard focus. Additional readings on the topic of keyboard focus management: |
@mush42 I'm sure there will be many more detailed responses to your comments here, but in the meantime: thank you very much for taking the time to write this constructive, thoughtful and educational review. |
Thank you for the detailed review @mush42. I think we should tackle the icons first since it's at the top of your list, and has been on our radar for a while. Adding this to our roadmap for the 2.1 release. The main piece of work here (and for their conversion to SVG at #1224) is that the icons are used as CSS classes on arbitrary elements instead of being componentised. We started doing this for the React Icon implementation, but not in HTML. This isn't that big of a refactoring, we'll just need to make sure there are no visual regressions. Once this is done, it will be easier to rework the icon implementation to make it screen-reader friendly, and later change it to SVG. @renestalder would you be willing to contribute to the icons rework? I have basic experience with accessibility, but not much with testing it (beyond using VoiceOver). Could use help developing and testing the new version. In particular it would be really helpful if you could help us set automated tests / linting for accessibility matters so we have some baseline checks in place. Looking at the other issues, I think "Navigating Page Content" would be the hardest to address. The Wagtail UI code is notoriously hard to refactor, so any changes to the document outline are likely to cause breakage. @mush42 are there specific pages you think we should prioritise here? I think it may be easier to address page by page, or section by section. For focus management, I'll have a look at the Pages / Explorer sub-menu. It already has some focus management in place so this should be an easy fix (@renestalder any experience testing these types of modals?). |
Hi @thibaudcolas, A pragmatic (and dirty) fix for the content navigation issue is to use aria properties on the existing markup, without touching the document outline. For instance, we can add a role of heading to a "div" element with an aria-level of 1 and the screen reader will consider it a perfectly normal "h1" element. An example follows: A hypothetical, semantically inaccessible, element.
The pragmatic fix, which results in a semantically accessible element:
========= For this to happen, a role of "menu" should be added to the parent menu element, and its aria-expanded attribute should be set to either true or false depending on the initial state of the menu, and the aria-expanded attribute should be toggled via javascript as the menu state changes. An example follows:
|
@thibaudcolas Sure. To be honest here, I didn't do automatic tests yet, we did this manually all the time, with browser addons like Lighthouse and the screenreader tools directly. But those browser addons or their core also exists as CLI, so it shouldn't be a problem to get this into the front-end tests. |
👋 just a quick update that this hasn't fallen off the radar. We're busy with the big Wagtail 2.0 release, and once this is out I'll move onto the icons rebuild. @renestalder could you have a look at the React implementation of the icons (used in Wagtail's "Pages" explorer menu) and let us know how you think it fares accessibility-wise? We tried to implement it with screen readers in mind, but I'm not sure whether we actually succeeded. On the automated testing front, I tried a few tools and settled on aXe for now. It's not the best in terms of number of issues found, but it has the advantages of being free, easy to integrate in our testing suite, and it doesn't ever report false positives. |
@thibaudcolas Just from the code of the icon component, this looks totally fine to me, as long as you make sure, you have a textual representation of the icon outside of the component or by making the title property of the component itself required. Just make sure you never serve an icon without a textual representation. |
@thibaudcolas @renestalder If the icons are there for presentation (only) purposes, then it is not necessary to provide textual description. Otherwise, if the icons are used by themselves to convey a piece of information, it is critical to provide an alternative text. |
We now have an accessible icon implementation in Django, thanks to the work of @SanderTuit in #4381 (based on the React implementation I linked above). The next step is refactoring as many of the icons in the admin as possible to this new implementation, while making sure this doesn't cause style regressions. I'll attempt to do this for the sidebar this week, if other people want to tackle other parts of the admin as well it would help a lot. Wagtail 2.1 is scheduled in about a week, it would be really cool to have some of the icons switched over by then. |
I'm going to work on number 2, Navigating Page Content, during the Wagtail Space US sprint. |
👋 I'm going to be working on accessibility fixes for some of the Wagtail UI over the next few weeks. The plan so far is to do an initial audit of as much of the UI as possible, set up some tooling (#4871), then deliver as many fixes as possible, aiming for Wagtail 2.6 (prioritising things that are big blockers like what's been mentioned here). If you're interested in helping with this, there is an |
As part of my current accessibility work, I decided to invest a bit of time to write a formal proposal for how I think accessibility should be handled by Wagtail as a project. Wagtail uses RFCs (Request For Comment) for this, via pull requests so they can be commented on. Here is the one I just published: wagtail/rfcs#37. This is quite high-level, and obviously a lot of the tasks listed in there are in motion already, but if accessibility is something you care about please go have a look and comment. |
I've started creating separate issues for each of the problems initially reported by @mush42 (#4199 (comment)). We've given these a higher priority as part of our current work, since they are well defined and their resolution is critical for screen reader users to be able to use Wagtail. Here are the individual issues:
We've identified many more accessibility issues, but at this stage we're choosing to only add things to the issue tracker once they are part of our backlog. I won't be posting all of the issues here – if you want to keep track of what's covered, please have a look at the corresponding “WCAG2.1 AA compliance” project board and “Accessibility” issue label. |
Hello everyone,
After reading the docs, I've decided to use Wagtail on one of my personal projects.
Since I'm blind, I've discovered that my experience on editing content would be rather unpleasant, because the admin interface of Wagtail has some accessibility problems.
For example, the icon-font being used in the admin is not screen-readers friendly, it keeps adding random letters wherever it is used. This happen because it doesn't use the safe-unicode character range. This could be resolved by a simple javascript function which hides the icons from screen-readers.
Proposal:
Making Wagtail an accessible content management system. By adding necessary markup (and scripts) to wagtail's templates and outputs.
Goal:
Enable the users of Assistive technology to efficiently manage and edit content in a Wagtail powered site.
Rationale:
Execution:
I'll make a list of each area of Wagtail that may need some accessibility related fixes, and open an issue for each one.
Questions:
Regards,
The text was updated successfully, but these errors were encountered: