Files
Donkie 8a5cf7ec73 client_v2: add mobile accessibility audit (Playwright + axe-core)
Adds an npm run audit:a11y target that runs axe-core (WCAG 2.0/2.1 A+AA
plus the 2.2 target-size rule) and a custom tap-target measurement across
the main surfaces under Pixel 5 emulation, reusing the dev server on 5174.
Results are aggregated to a11y-report.md via globalTeardown so they survive
Playwright worker restarts.
2026-07-25 19:07:24 +02:00

11 lines
439 B
TypeScript

import { rm, mkdir } from 'node:fs/promises';
import { SURFACES_DIR, REPORT_PATH } from './report';
// Runs once before the suite: clear any per-surface results and the report from
// a previous run so the new report reflects only this run.
export default async function globalSetup() {
await rm(SURFACES_DIR, { recursive: true, force: true });
await rm(REPORT_PATH, { force: true });
await mkdir(SURFACES_DIR, { recursive: true });
}