Accessibility wins for Django projects
2020-09-19, 13:15–13:55, Virtual

Accessibility is a big topic, which can be hard to approach. We'll look at how the team behind Wagtail set to work on making their CMS more accessible, focusing on Django-specific improvements that are relevant to all projects.

Along the way we'll learn about,

  • Why we care about making accessible sites and apps
  • Accessibility considerations when modelling a site’s content
  • Tooling and techniques to assess the accessibility of Django projects

Introduction

Over the last year, the team behind Wagtail set out to make their CMS more accessible. We wanted to both make the CMS more usable for users of assistive technologies, and reach the relevant compliance targets.

We learned a lot about accessibility during this process. While most accessibility concerns are resolved at the UI level with templates and styles, there are a number of cases where deeper knowledge of Django comes in handy. Django developers can make a difference on their projects by being aware of cases where back-end customisations are needed, such as:

  • Forms and fields markup. Django’s defaults can hinder navigation for screen reader users, and need to be customised.
  • Required attributes for models of images. Administrators should also be able to customise their alt text, in the context images are used.

Developers should also make the most of available tooling for Django projects: linters, HTML validation middleware, pattern libraries; that will all help building an accessible experience.

And beyond developer tools, it’s also very valuable for developers to know how to use assistive technologies to test their work. It’s completely within reach of anyone to do basic testing with screen readers, and this is beneficial on all projects.

Talk structure

Intro: a Wagtail story

  • Thibaud, front-end developer, core developer of Wagtail
  • We started work on making Wagtail more accessible about a year ago
  • Here is what we learned along the way, that is relevant to all Django projects

Why we care about accessibility

  • Inclusive design – user experience should be good for_all_ users
  • Accessibility improvements generally lead to usability improvements
  • Legislation is evolving and compliance is now mandatory
  • This is relevant to all projects – not just public facing sites

Accessibility 101

  • Semantic page structure
  • Keyboard navigation
  • Images and icons

Django templates and accessibility

  • Forms
  • Pagination
  • HTML validation & templates linting

Django models and accessibility

  • Headings, labels and landmarks
  • Images’ alt text

Live demo: screen reader testing

  • Testing a page with a browser extension
  • Testing a page with a real screen reader
  • Screen reader keyboard shortcuts you can learn in 1 minute

Key takeaways

  • Accessibility matters on all projects
  • Django developers can make a difference
  • Screen reader testing is within reach and has a big impact

Approach

The talk starts with a case study of how we set out to make Wagtail more accessible, prompted by recent legislative changes in the EU and UK. We’ll then quickly move on to accessibility issues that tend to be specific to Django projects, demonstrating their consequences and suggesting solutions. We’ll showcase tools that can help developers on Django projects in particular – then do a live demo of screen reader testing, a technique that all developers should know the basics of to meaningfully test that what they build is accessible.

This should generally be a beginner-level talk for Django developers, but there will be a lot to learn for all skill levels in the domain of accessibility. Finally I believe that screen reader testing is underused as a technique, and will be relevant to most of the audience.

Video: https://www.youtube.com/watch?v=PO0w2BJk33s&ab_channel=DjangoConEurope