Skip to content

feat(chat): honor prefers-reduced-motion across chat + a2ui#284

Merged
blove merged 3 commits into
mainfrom
claude/prefers-reduced-motion
May 13, 2026
Merged

feat(chat): honor prefers-reduced-motion across chat + a2ui#284
blove merged 3 commits into
mainfrom
claude/prefers-reduced-motion

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 13, 2026

Summary

  • Adds a single @media (prefers-reduced-motion: reduce) block to ROOT_TOKEN_STYLES in chat-tokens.ts
  • Universal selector (*, *::before, *::after) collapses all chat + a2ui transition/animation sites (~77 of them) to 0.01ms
  • Six infinite-loop indicators (spinner, typing dots, caret, welcome pulse, shimmer skeleton, debug pulse) get animation: none !important static fallbacks — frozen mid-loop reads as a bug
  • Zero new tokens, zero consumer-facing API changes, zero JS

WCAG 2.3.3 compliance.

Spec & Plan

  • docs/superpowers/specs/2026-05-12-prefers-reduced-motion-design.md
  • docs/superpowers/plans/2026-05-12-prefers-reduced-motion.md

Test plan

  • Unit: 12 vitest assertions on ROOT_TOKEN_STYLES content
  • Manual (reviewer): macOS → System Settings → Accessibility → Display → Reduce Motion → on
    • Sidenav drawer snaps open/closed (no slide)
    • Tool-call spinner static (no rotation)
    • Typing dots steady (no pulse)
    • Welcome pulse off
    • Shimmer skeleton flat
    • Drag-to-reorder pinned threads still works
    • Toggle off → motion returns

🤖 Generated with Claude Code

blove and others added 3 commits May 12, 2026 20:15
Single @media block injected via ROOT_TOKEN_STYLES collapses all 77
chat + a2ui motion sites to instant, with targeted static fallbacks
for the six infinite-loop indicators.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Single-task TDD plan: failing spec → export ROOT_TOKEN_STYLES → add
@media block → confirm pass → manual smoke → PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Single @media block injected via ROOT_TOKEN_STYLES collapses every
transition/animation to instant under the user's OS-level "Reduce
Motion" setting. Targeted overrides replace six infinite-loop
indicators (spinner, typing dots, caret, welcome pulse, shimmer
skeleton, debug pulse) with static fallbacks — frozen mid-loop reads
as a bug.

WCAG 2.3.3 compliance. No JS, no consumer changes, no new tokens.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

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

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 13, 2026 3:25am

Request Review

@blove blove merged commit 558d982 into main May 13, 2026
14 checks passed
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