Jump to content

Accessibility Checker

From mediawiki.org
Manual on MediaWiki Tools
MediaWiki Accessibility Checker
Release status: beta
Description A modern, high-performance accessibility auditing tool designed for the MediaWiki ecosystem, providing deep WCAG 2.2 AA validation.
Author(s) Francesco Tosoni (Super nablatalk)
License Mozilla Public License 2.0
Download GitHub repo
README.md
changelog
Example toolforge:accessibility-checker
Tags
accessibility, playwright, python, fastapi, codex

MediaWiki Accessibility Checker (accessibility-checker) is a modern, high-performance web utility that evaluates the accessibility of HTML pages, with a special focus on Wikipedia, Wikimedia Commons, and other MediaWiki-based projects. It helps ensure that digital content remains navigable and accessible for all individuals, particularly those utilising assistive technologies.

Powered by axe-core and Playwright, the tool performs deep DOM validation against international standards (like WCAG 2.2 AA). The user interface is built using the Wikimedia Codex design system to provide a seamless and familiar experience within the Wikimedia environment.

Try it out: toolforge:accessibility-checker

Features

[edit]

The tool provides a comprehensive and professional suite for accessibility auditing:

  • Deep Validation: Performs WCAG 2.2 AA compliance checks using the industry-standard axe-core engine.
  • Intelligent DOM Enrichment: Automatically retrieves full HTML snippets and image previews for the elements that trigger accessibility violations, making debugging significantly easier.
  • Multi-Format Exports: Generates professional reports in various formats, including PDF, JSON, CSV, and Wikitext (ready to be pasted directly onto Wiki talk pages).
  • RESTful API: Provides a fully documented OpenAPI/Swagger interface for programmatic access and CI/CD integrations.
  • Codex UI: A beautiful, responsive interface that follows Wikimedia's modern design guidelines.

System Architecture

[edit]

The tool has been completely modernised and rebuilt from the ground up, moving away from legacy PHP frameworks to a highly concurrent Python stack.

Core Components

[edit]
  • Backend Layer: Developed in Python 3.11+ using the FastAPI framework. This handles the asynchronous REST API, request validation, and routing.
  • Evaluation Engine: Utilises Playwright to spin up a headless Chromium browser instance. It navigates to the target URL and injects the axe-core JavaScript library to perform native DOM analysis, capable of piercing shadow DOMs and evaluating complex interactive components.
  • Export Pipeline: A dedicated service layer that transforms the raw axe-core JSON results into various formats, leveraging Playwright's native Print-to-PDF capabilities and custom Wikitext generators.
  • Frontend Layer: A lightweight HTML/JS/CSS frontend styled completely with Wikimedia Codex tokens and components, communicating asynchronously with the FastAPI backend.

Deployment

[edit]

The tool is optimised for deployment on Wikimedia Toolforge, where it runs in a containerised environment.

  • Build Service: It utilises the modern Toolforge buildpack system, defined by a Procfile.
  • Gunicorn/Uvicorn: The application is served using Gunicorn with Uvicorn async workers to handle multiple concurrent browser sessions efficiently without timeouts.

Source Code

[edit]

The source code for the MediaWiki Accessibility Checker is open-source and hosted on GitHub.

  • Repository: GitHub
  • License: Mozilla Public License 2.0 (MPL-2.0)
  • Contribution: Development is open to the community. Please see the repository for contribution guidelines.

See also

[edit]