From b97475103bc724dd58de471630b510034b89267e Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Wed, 25 Jan 2023 16:03:25 +0000 Subject: [PATCH] Move accessibility checker to its own section of release notes, with upgrade considerations --- docs/releases/4.2.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/releases/4.2.md b/docs/releases/4.2.md index 9f9f8fe85c..5a967f21aa 100644 --- a/docs/releases/4.2.md +++ b/docs/releases/4.2.md @@ -46,6 +46,12 @@ Wagtail now uses the Stimulus framework for client-side interactivity (see [RFC Those changes improve the maintainability of the code, and help us move towards compatibility with strict CSP (Content Security Policy) rules. Thank you to Loveth and project mentors LB (Ben) Johnston, Thibaud Colas, and Paarth Agarwal. +### Accessibility checker integration + +The CMS now includes an accessibility checker in the [user bar](wagtailuserbar_tag), in order to assist users in building more accessible websites and follow [ATAG 2.0 guidelines](https://www.w3.org/TR/ATAG20/). The checker, which is based on the Axe testing engine, is designed for content authors to identify and fix accessibility issues on their own. It scans the loaded page for errors and displays the results, with three rules turned on in this release. It’s configurable with the [`construct_wagtail_userbar`](construct_wagtail_userbar) hook. + +This new feature was implemented by Albina Starykova as part of an [Outreachy internship](https://wagtail.org/blog/our-very-first-outreachy-interns/), with support from mentors Thibaud Colas, Sage Abdullah, and Joshua Munn. + ### Rich text improvements Following feedback from Wagtail users on [rich text UI improvements in Wagtail 4.0](rich_text_improvements_4), we have further refined the behavior of rich text fields to cater for different scenarios: @@ -81,9 +87,7 @@ This feature was developed by Matt Westcott, and sponsored by [YouGov](https://y * Add a system check to warn when a `django-storages` backend is configured to allow overwriting (Rishabh jain) * Update admin focus outline color to have higher contrast against white backgrounds (Thibaud Colas) * Implement latest design for the admin dashboard header (Thibaud Colas, Steven Steinwand) - * Add Axe accessibility checker integration within userbar, with count and list of errors (Albina Starykova) * Restyle the userbar to follow the visual design of the Wagtail admin (Albina Starykova) - * Allow configuring Axe accessibility checker integration via `construct_wagtail_userbar` hook (Sage Abdullah) * Adjust the size of panel labels on the "Account" form (Thibaud Colas) * Delay hiding the contents of the side panels when closing, so the animation is smoother (Thibaud Colas) * ListBlock now shows item-by-item differences when comparing versions (Tidiane Dia) @@ -256,6 +260,19 @@ wagtail-userbar::part(userbar) { } ``` +### Configuration of the accessibility checker user bar item + +Like other userbar items, the new accessibility checker is configurable with the [`construct_wagtail_userbar`](construct_wagtail_userbar) hook. For example, to remove the new item, use: + +```python +from wagtail.admin.userbar import AccessibilityItem + + +@hooks.register('construct_wagtail_userbar') +def remove_userbar_accessibility_checks(request, items): + items[:] = [item for item in items if not isinstance(item, AccessibilityItem)] +``` + ### Support for legacy versions of `azure-mgmt-cdn` and `azure-mgmt-frontdoor` packages will be dropped If you are using the front-end cache invalidator module (`wagtail.contrib.frontend_cache`) with Azure CDN or Azure Front Door, the following packages need to be updated: