Skip to content

fix(web): reduced motion, skip link and live campaign status (#35, #4, #33) - #167

Open
RupeshMaster wants to merge 4 commits into
CodewithJha:mainfrom
RupeshMaster:fix/web-a11y
Open

RupeshMaster wants to merge 4 commits into
CodewithJha:mainfrom
RupeshMaster:fix/web-a11y

Conversation

@RupeshMaster

@RupeshMaster RupeshMaster commented Nov 27, 2026 •

Copy link
Copy Markdown

Summary

Three small Hosted UI accessibility fixes, one commit each. Closes #35, closes #4, closes #33. No layout, spacing or brand changes.

  • Reduced motion (a11y: honor prefers-reduced-motion in Hosted globals.css #35): a @media (prefers-reduced-motion: reduce) block at the end of globals.css makes animations and transitions finish immediately and turns smooth scrolling off (html, .landing). It applies to every element, so it covers the landing orbs (orb-drift), .reveal / fade-up entrances, skeleton-shimmer, pulse-ring and pulse dots, story-pulse, preview-settle, and hover / sidebar transitions. Focus outlines are not animated and are unchanged.
  • Skip link (a11y: skip-to-content / focus order on Hosted landing #4): the landing's first focusable element is a "Skip to content" link, off-screen until it receives keyboard focus, pointing at the existing <main id="top">. <main> takes tabIndex={-1} so focus moves with the jump, and the outline that would wrap the whole page on that programmatic focus is suppressed.
  • Live status (a11y: aria-live region for Hosted campaign running/finished status #33): the campaign page header has a visually hidden role="status" aria-live="polite" region with the same state the chips show: "Campaign running: searching for a break." → "Campaign finished: break found, verified violation." (or "Campaign status: Completed." / "Failed.").

#35 and #33 are assigned to @CodewithJha with no activity since September, so I went ahead; if you already have work in progress on them, feel free to close this. Happy to split this into three PRs if you prefer.

Type of change

Checklist

  • I read CONTRIBUTING.md (where to ask, how reviews work, how to run tests)
  • Linked related issue (Fixes #N) or Discussion when applicable
  • Core stays free of framework SDK imports (adapters own glue)
  • Tests added or updated when behavior changes (uv run pytest tests/unit -q) — none added; the three behaviors were checked in a browser (see test plan)
  • Docs / README claims match reality (no PyPI / multi-adapter claims unless shipped)
  • One concern per PR when possible
  • Authorized testing only — no open-internet attack-proxy behavior

Test plan

  • Python lint: uv run --locked ruff check → all checks passed
  • Backend tests: uv run pytest tests/unit tests/integration tests/reliability -q → 848 passed (no Python changes). Python 3.12 only; 3.11 is left for CI.
  • CLI smoke: from a copy of examples/openai_support_agent, mutiny --help, mutiny init, mutiny run with MUTINY_SAMPLE_OFFLINE=1 and empty OPENAI_API_KEY / FEATHERLESS_API_KEY → violation found, regression saved.
  • Web: npm ci, npm run lint, npx tsc --noEmit, npm test and npm run build. Run on Node 26, not CI's Node 20.
  • Package build + isolated artifact gate: tests/unit/test_package_release.py passed as part of the unit run; ./scripts/verify_release_artifacts.sh not run.

Manual checks, measured in headless Chromium against a local API and next dev:

  • Skip link: off-screen before focus; first Tab focuses it and it is visible at the top-left; Enter sets #top, focus lands on MAIN#top with no outline; the next Tab stop is the first control inside <main>.
  • Reduced motion: with prefers-reduced-motion: no-preference, .landing-orb runs orb-drift for 12s infinitely, .reveal 0.6s, .btn transitions 0.2s, scroll-behavior is smooth. With reduce: durations are 1e-05s, iteration count 1, scroll-behavior auto, and .reveal content ends fully visible (opacity 1).
  • Live region: one region on the campaign page, 1×1px; while a demo campaign ran its text changed from "Campaign running: searching for a break." to "Campaign finished: break found, verified violation."

Not done: a pass with a real screen reader (VoiceOver / NVDA), and no automated web tests were added for these three.

Notes

  • AI assistance: this change was written with an AI coding agent. The checks above were run locally before opening the PR.

Under `prefers-reduced-motion: reduce`, animations and transitions finish
immediately and smooth scrolling is turned off. This covers the landing
orbs, reveal/fade-up entrances, skeleton shimmer, pulse dots and rings,
the story pulse, hover/sidebar transitions and in-page anchor scrolling.
Focus outlines are not animated and are unchanged.

Closes CodewithJha#35
The landing's first focusable element is now a "Skip to content" link,
visually hidden until it receives keyboard focus, that jumps past the
sticky nav to the existing <main id="top">. <main> takes tabindex=-1 so
focus moves with the jump. No layout or brand changes.

Closes CodewithJha#4
The campaign page updated its running / finished / violation state
visually only. A visually hidden role="status" aria-live="polite"
region in the header now carries the same state as text, so assistive
technology announces it when the campaign finishes or finds a break.
No visual change.

Closes CodewithJha#33
@vercel

vercel Bot commented Nov 27, 2026

Copy link
Copy Markdown

@RupeshMaster is attempting to deploy a commit to the priyanshu's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant