Skip to content

Label the auth forms, reach the upload box by keyboard, pause the site's demo clips - #396

Merged
dillonstreator merged 4 commits into
mainfrom
improve/form-labels-and-motion
Nov 28, 2026
Merged

dillonstreator merged 4 commits into
mainfrom
improve/form-labels-and-motion

Conversation

@dillonstreator

Copy link
Copy Markdown
Member

Fixes A11Y-001, A11Y-003, A11Y-005 and part of A11Y-006 (the auth error banners) from the 2026-11-28 audit. Companion to #393, #394 and #395. The branches are independent.

What was wrong

  • A11Y-001: on the sign-in, reset-password and must-change-password forms, each <label> sat next to its input with no htmlFor/id. The inputs had no accessible name, so Name, Email and Password all read as an unnamed edit field.
  • A11Y-006 (auth part): the error banners on those forms appeared without being announced.
  • A11Y-003: the new-project "Choose or drop a video file" box hid its file input with display: none, so Tab never reached it.
  • A11Y-005: the marketing site's hero, clip strip and feature tabs autoplay looping clips, and the tabs advance on their own. Only prefers-reduced-motion stopped them, and there was no pause control (WCAG 2.2.2).

What changed

  • Login.tsx, ResetPassword.tsx, MustChangePassword.tsx:
    • Every field has a matching htmlFor/id pair.
    • Login's and must-change-password's banners are role="alert" for an error and role="status" otherwise.
    • Reset-password's banner is always rendered, so it is a live region: assertive for an error, polite otherwise.
  • NewProject.tsx: the file input is sr-only instead of hidden, and the dashed box shows an accent outline while the input has focus.
  • website/components/loop-video.tsx:
    • A per-page "paused" switch. useReducedMotion() now returns true for reduced motion or paused, so every LoopVideo and the tabs' auto-advance stop through the code paths they already had.
    • MotionToggle is a pressed/unpressed button using the Pause and Play icons from the pipeline film. It is placed under the hero, beside the clip strip's source and under the feature panel. Pausing any one pauses all of them.
    • New strings were extracted and have Russian translations.
  • The lint ratchet's noLabelWithoutControl baseline drops from 21 to 13.
  • Changeset (patch).

How it was tested

  • apps/server/test/ui-a11y-guards.test.ts reads the pages and checks that:

    • each label's htmlFor matches the next input's id;
    • the banners have their roles or live region;
    • the file input is sr-only with a focus outline;
    • the pause reaches useReducedMotion and every section renders the toggle.

    The web app has no component test runner, and the axe e2e (e2e/a11y.spec.ts) needs a running stack and covers signed-in screens only, so these checks read the source. They fail on origin/main.

  • Local gate, with ANTHROPIC_* unset:

    • Passed: pnpm -r typecheck, biome ci (0 errors), pnpm guards, docs:check, and i18n:check for server and web.
    • Website: pnpm i18n:check, pnpm typecheck and pnpm build pass.
    • Stack-free unit tests: 1597 tests, 1596 pass. The one failure is the bumper crossfade, which also fails on origin/main on this machine because of the local ffmpeg build.
  • Not run here: the Playwright axe suite, because it needs the app running.

Needs manual verification

  • With VoiceOver or NVDA on /login: each field is announced with its label, and a wrong password is announced.
  • On /new: Tab reaches the upload box, its outline shows, and Space/Enter opens the file picker.
  • On the marketing site: the pause button stops the hero, strip and tab videos and the tab auto-advance, and play resumes them. Check where the buttons sit at phone width.
  • Run pnpm --filter @reelsaw/web e2e against a stack to confirm the axe baseline is unchanged.

For the reviewer to decide

  • One pause switch for the whole page versus one per section. I chose a shared switch, with a button in each moving section.
  • The pause is per page view and not remembered. It could be persisted if you prefer.

Left out

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 <dillonstreator@gmail.com>
The hero, the clip strip and the feature tabs autoplay muted clips on a
loop, and the tabs advance on their own; only prefers-reduced-motion
stopped them (WCAG 2.2.2 asks for a pause control on anything that moves
for more than five seconds).

loop-video.tsx keeps one per-page "paused" switch next to the reduced-
motion query, and useReducedMotion() answers true for either, so every
LoopVideo and the tabs' auto-advance stop through the paths they already
had. MotionToggle (a pressed/unpressed button, the same Pause and Play
icons as the pipeline film) sits under the hero, beside the clip strip's
source and under the feature panel; pausing one pauses all. Russian
strings added; the pseudo-locale fills itself.

ui-a11y-guards.test.ts checks the switch reaches the hook and that each
section renders the button.

Signed-off-by: dillonstreator <dillonstreator@gmail.com>
Signed-off-by: dillonstreator <dillonstreator@gmail.com>
The auth forms' eight labels now name their inputs.

Signed-off-by: dillonstreator <dillonstreator@gmail.com>
@vercel

vercel Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
reelsaw-website Ready Ready Preview Nov 28, 2026 7:46pm UTC

Request Review

@dillonstreator
dillonstreator merged commit 8277093 into main Nov 28, 2026
16 checks passed
@dillonstreator dillonstreator mentioned this pull request Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant