ADR 0006: Check accessibility with Lighthouse CI on every merge request
Ce contenu n’est pas encore disponible dans votre langue.
- Status: accepted
- Date: 2026-11-21
- Answers: question Q7 of the project charter
Context and Problem Statement
Section titled “Context and Problem Statement”Objective O5 requires a Lighthouse accessibility score of at least 90.
When do we check it: once at the end of the project (issue #24), or
automatically on every change of the web application?
Decision Drivers
Section titled “Decision Drivers”- Find accessibility regressions as early as possible
- Turn the charter rule (score ≥ 90) into an automatic check
- Stable results: a check must not fail at random
- Limited use of CI minutes (risk R8)
Considered Options
Section titled “Considered Options”- Manual Lighthouse check at the end (issue #24)
- Lighthouse CI job in the
webpipeline - axe accessibility checks in end-to-end tests
Decision Outcome
Section titled “Decision Outcome”Chosen option: “Lighthouse CI job in the web pipeline”, because it makes
the charter rule a blocking check from the first version of the application.
- Tool: Lighthouse CI (
@lhci/cli, commandlhci autorun), run on the production build ofweb. - The job runs only in merge request pipelines and on
main. - Assertions:
| Category | Level | Minimum score |
|---|---|---|
| Accessibility | error (blocks the merge request) | 0.9 |
| Best practices | error (blocks the merge request) | 0.9 |
| Performance | warning only | 0.8 |
| SEO | warning only | 0.9 |
- Performance is only a warning, because its score changes from one run to the next on shared CI runners.
- The HTML reports are kept as job artifacts, so each merge request has its report.
- The job is a shared template in
ci-templates(lighthouse.yml), ready for the next projects.
axe checks in end-to-end tests are a possible next step: they can check states that Lighthouse does not see (open dialog, widget in error, keyboard move mode).
Consequences
Section titled “Consequences”- Good: an accessibility regression cannot be merged.
- Good: a report for every merge request, visible to reviewers.
- Good: reusable for JobRadar and Sinistra.
- Bad: about one or two more CI minutes per pipeline of
web. - Bad: Lighthouse CI bundles its own Lighthouse version, which can be older than the one in Chrome DevTools: scores may differ slightly.
- Bad: Lighthouse only checks the page as loaded; a score of 100 does not mean full WCAG compliance. The manual keyboard test of issue #24 stays.
Pros and Cons of the Options
Section titled “Pros and Cons of the Options”Manual check at the end
Section titled “Manual check at the end”- Good: nothing to set up.
- Bad: a regression added early is found late, when it costs more to fix.
Lighthouse CI in the pipeline (chosen)
Section titled “Lighthouse CI in the pipeline (chosen)”- Good: automatic, blocking, with a report for every merge request.
- Bad: CI minutes; performance score not stable enough to block.
axe checks in end-to-end tests
Section titled “axe checks in end-to-end tests”- Good: checks several states of the interface, not only the first load.
- Bad: needs end-to-end tests first; planned later.