import { test } from "@playwright/test"; import { expectNoCriticalA11yViolations } from "./utils/axe"; test.describe("404 page a11y", () => { test("unknown route has no critical or serious axe violations", async ({ page }) => { // We intentionally do not assert status: React Router renders an // ErrorBoundary client-side for unknown routes, and the response code // is implementation-dependent. The a11y of the rendered DOM is what we // gate on here. await page.goto("/__nonexistent_route__", { waitUntil: "domcontentloaded" }); await expectNoCriticalA11yViolations(page); }); });