Skip to main content
Introducing packages.sweber.dev
All posts
Release2 min read

Surjection 0.1.0 released

Accessibility checks for Playwright and Vitest, a baseline for existing sites, reports and accessibility statements in five languages. MIT licensed, with a Pro edition for agencies.

By Seya Weber

Surjection 0.1.0 is out. It makes accessibility testing part of every project instead of a one-off scan before launch. @sweberdev/surjection and @sweberdev/surjection-react are on npm under the MIT licence.

Surjection is deliberately not an overlay. It runs in development and CI and helps you fix the code itself. Automated tests find only part of all barriers, so it does not promise legal conformity either.

What is in 0.1.0

  • A Playwright helper and a Vitest matcher on top of axe-core, testing against WCAG 2.2 AA by default.
  • Every finding mapped to its WCAG success criterion and the matching EN 301 549 clause.
  • A baseline for existing sites: CI fails only on new problems, not on the whole backlog.
  • A Markdown report for pull requests and job summaries, in German, Swiss German, French, Italian and English.
  • A generator for the accessibility statement (Erklärung zur Barrierefreiheit) in the same five languages, as Markdown and HTML.
  • Small accessible React building blocks: skip link, visually hidden text, live announcements and reduced motion.

Install

pnpm add -D @sweberdev/surjection

Test your most important pages in Playwright:

import { test } from "@playwright/test"
import { expectAccessible } from "@sweberdev/surjection/playwright"
import baseline from "./a11y-baseline.json"

for (const path of ["/", "/shop", "/checkout"]) {
  test(`${path} is accessible`, async ({ page }) => {
    await page.goto(path)
    await expectAccessible(page, { baseline, failOn: "serious", locale: "de" })
  })
}

The full reference is at packages.sweber.dev/surjection/docs.

Surjection Pro

For agencies there is a Pro edition with three packages: client reports in your own branding as HTML and PDF, a history across all client projects that shows progress over time, and a guided checklist for the 55 WCAG 2.2 A and AA criteria that automated tests cannot cover. There is no licence key and no phone-home, and every version you received keeps working after you cancel.

Plans start at CHF 19 per month. You can try the Pro demo and see all plans on the package page.

Package in this post

Surjection

Accessibility checks for CI and tests, client-ready reports and accessibility statements in five languages. Built on axe-core, no overlay.

pnpm add -D @sweberdev/surjection
View package

Related posts

Release

Gradient 0.1.0 released

Accessible OKLCH color scales from one brand color. The step number tells you the contrast, in light and dark mode. Export for Tailwind, CSS variables and design tokens.

Gradient
Release

Cosine 0.1.0 released

Semantic search for documentation sites that runs entirely in the browser. Keyword results on the first keystroke, ranking by meaning once the model has loaded. No server, no API key.

Cosine
Release

Derivative 0.1.0 released

A self-hosted changelog and "What's new" widget, built from the Changesets, CHANGELOG.md or commits you already have. No SaaS, no tracking, about 6 kB.

Derivative