Best Practices for Making a Wagtail Site as Accessible as Possible with Scott Cranfill

Learn best practices for building an accessible Wagtail site, covering semantic markup, template configurations, image alt text, custom validation, aria-labels, and more, with practical tips for promotion and testing.

Key takeaways
  • Use semantic markup and templates to ensure accessibility
  • Configure Wagtail’s settings to improve accessibility, such as setting the correct heading hierarchy
  • Add alt text fields for images and promote better alt text practices
  • Use a custom image model and override the default image title to provide more descriptive alt text
  • Implement custom validation to check aria-label fields and ensure they’re not left empty
  • Add aria-labels for links and other interactive elements to provide context for screen readers
  • Ensure that all page content is contained within landmarks, such as the main content area
  • Use the ax framwork to check for accessibility errors and fix them
  • Provide help text and guidance to editors to promote better accessibility practices
  • Consider using Wagtail’s built-in features, such as the stream field, to improve accessibility
  • Test and validate your site’s accessibility using tools like axe and Lighthouse
  • Consider using Wagtail’s accessibility checker to flag accessibility errors and provide suggestions for improvement