From 77bcf07162626ed9f132700b58275159506d06cc Mon Sep 17 00:00:00 2001 From: dillonstreator Date: Sat, 28 Nov 2026 13:43:33 -0600 Subject: [PATCH 1/4] Name the auth form fields, announce their errors, reach the upload box The sign-in, reset-password and must-change-password forms had each label beside its input with no htmlFor/id, so the inputs had no accessible name (a screen reader heard "edit text" for Name, Email and Password alike). Their error banners appeared silently. The new-project upload box hid its file input with display:none, so Tab never reached it. - Each label now has htmlFor and its input the matching id. - Login's banner is role="alert" for an error and "status" for a notice; must-change-password's the same; reset-password's always-rendered banner is a live region (assertive for an error, polite otherwise). - The upload input is sr-only, and the dashed box shows an outline while it has focus. ui-a11y-guards.test.ts reads the pages and checks each of these; the axe run in e2e/a11y.spec.ts covers signed-in screens only. Signed-off-by: dillonstreator --- apps/server/test/ui-a11y-guards.test.ts | 56 +++++++++++++++++++++++ apps/web/src/pages/Login.tsx | 25 +++++++--- apps/web/src/pages/MustChangePassword.tsx | 8 ++-- apps/web/src/pages/NewProject.tsx | 5 +- apps/web/src/pages/ResetPassword.tsx | 21 +++++++-- 5 files changed, 100 insertions(+), 15 deletions(-) create mode 100644 apps/server/test/ui-a11y-guards.test.ts 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..c175ea18 --- /dev/null +++ b/apps/server/test/ui-a11y-guards.test.ts @@ -0,0 +1,56 @@ +/** + * 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. + */ +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