diff --git a/.changeset/form-labels-and-motion.md b/.changeset/form-labels-and-motion.md new file mode 100644 index 00000000..b83b42ab --- /dev/null +++ b/.changeset/form-labels-and-motion.md @@ -0,0 +1,5 @@ +--- +"@reelsaw/server": patch +--- + +Accessibility: the sign-in, reset-password and must-change-password fields are labelled for screen readers and their errors are announced; the new-project upload box is reachable with Tab; the marketing site's looping demo clips and self-advancing feature tabs have a pause button. diff --git a/apps/server/test/ui-a11y-guards.test.ts b/apps/server/test/ui-a11y-guards.test.ts new file mode 100644 index 00000000..6cc1e0d5 --- /dev/null +++ b/apps/server/test/ui-a11y-guards.test.ts @@ -0,0 +1,69 @@ +/** + * Accessibility fixes the browser ratchet (apps/web/e2e/a11y.spec.ts) does not reach: it runs signed in, on the main + * screens, against a running stack. Read as source, like the other web checks here. + * - Sign-in, reset and must-change-password: each field's label names its input (htmlFor/id), and errors are + * announced (role="alert", or a live region). + * - New project: the file input is visually hidden, not display:none, so the keyboard reaches it. + * - Marketing site: every looping demo clip and the self-advancing tabs obey a pause button (WCAG 2.2.2), not only + * prefers-reduced-motion. + */ +import { describe, it } from "node:test"; +import assert from "node:assert/strict"; +import fs from "node:fs"; +import path from "node:path"; + +const root = path.join(import.meta.dirname, "..", "..", ".."); +const read = (p: string) => fs.readFileSync(path.join(root, p), "utf8"); + +/** each