import AxeBuilder from "@axe-core/playwright"; import { expect, test } from "@playwright/test"; for (const path of ["/", "/records", "/report", "/rules", "/privacy"]) { test(`${path} has no serious accessibility violations`, async ({ page }) => { await page.goto(path); const results = await new AxeBuilder({ page }).withTags(["wcag2a", "wcag2aa", "wcag21aa"]).analyze(); expect(results.violations.filter(item => ["critical", "serious"].includes(item.impact ?? ""))).toEqual([]); }); }