tests/a11y.spec.js
// Automated accessibility checks with axe-core (§77). They catch roughly a
// third of real issues — missing labels, contrast, ARIA misuse — for free.
import AxeBuilder from "@axe-core/playwright";
import { test, expect } from "./fixtures.js";
test("the chat screen has no detectable a11y violations @a11y", async ({ chat, page }) => {
await chat.ask("where is A-1001?");
await chat.waitForReply();
const results = await new AxeBuilder({ page }).withTags(["wcag2a", "wcag2aa", "wcag22aa"]).analyze();
expect(results.violations).toEqual([]);
});