Documentation menuGetting started
Getting started
Install Surjection and run your first check.
-
Install the package and Playwright with a browser:
pnpm add -D @sweberdev/surjection @playwright/test pnpm exec playwright install chromiumWith npm:
npm i -D @sweberdev/surjection @playwright/testandnpx playwright install chromium. -
Check a page:
npx surjection check https://example.ch --locale deEach page prints one line. The command exits with code
1when issues remain. -
Write a report you can attach to a pull request or hand to your team:
npx surjection check https://example.ch --out-md a11y.md --out-json a11y.json -
Run it on every build. See GitHub Actions, or use the Playwright helper in your existing end-to-end tests.
Requirements
- Node.js 20 or newer
- Playwright 1.40 or newer for page checks (
@playwright/testorplaywright) - Vitest 3 or newer for the component matcher (types target Vitest 5)