#33620: Accessibility in pipeline -------------------------------------+------------------------------------- Reporter: Sarah Abderemane | Owner: Sarah | Abderemane Type: New feature | Status: new Component: contrib.admin | Version: dev Severity: Normal | Resolution: Keywords: accessibility, ux, | Triage Stage: Accepted ui, admin | Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 1 -------------------------------------+-------------------------------------
Comment (by Thibaud Colas): Just seeing this now – this does feel like something that warrants its own ticket in my opinion. Evaluating the right tool is going to be a big task in its own right, let alone setting it up locally, and in CI. I can provide a few options I would recommend considering: - [https://github.com/mozilla-services/axe-selenium-python axe-selenium- python] seems worth considering, since Django already uses Selenium. I haven’t worked with Selenium in years myself so don’t really have the ability to judge how good of a fit this is. At a high level, all this does is injecting the Axe script onto the page and running it, with a nice API to configure Axe and get a useful report. - Puppeteer + Axe is what I have the most experience with myself, generally running within Jest to structure a test suite. This is very similar to the above but with JS tooling rather than Python. - Playwright + Axe is also popular these days. Playwright comes with its own testing framework contrary to Puppeteer. One important aspect is the need to test pages protected by login. To test public-facing pages, we could also consider: - [https://github.com/pa11y Pa11y], an opinionated "Puppeteer + Axe" CLI tool. - [https://darekkay.com/evaluatory/ Evaluatory], same but with Playwright My [https://github.com/thibaudcolas/django_admin_tests/blob/main/pa11y/test.js demo test suite] uses Pa11y + Puppeteer + Lighthouse. Since both Pa11y and Lighthouse are built upon Puppeteer, they can be used via their JS API so we can first use a Puppeteer script to log in, then hand over to those tools. --- To go through this, I’d recommend the following initial steps: 1. Confirm what exactly is needed between a testing tool (write assertions, break the build if fails) and a reporting tool (tests a given page and reports results) 2. Check whether there are any restrictions on what can run in CI (I can’t see whether Selenium tests run there) 3. Decide whether to use a Python Selenium integration or a JS-based tool (looks like [https://github.com/django/django/blame/main/package.json#L13 Django already uses Puppeteer?]). -- Ticket URL: <https://code.djangoproject.com/ticket/33620#comment:4> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/01070180deca8a83-0b1c61a5-344a-4632-a8f8-aaa41b001966-000000%40eu-central-1.amazonses.com.