Skip to content

fix(web): respect prefers-reduced-motion in ui-kit keyframes#2

Open
PrEvIeS wants to merge 1 commit intomainfrom
fix/reduced-motion-keyframes
Open

fix(web): respect prefers-reduced-motion in ui-kit keyframes#2
PrEvIeS wants to merge 1 commit intomainfrom
fix/reduced-motion-keyframes

Conversation

@PrEvIeS
Copy link
Copy Markdown
Owner

@PrEvIeS PrEvIeS commented Apr 27, 2026

Summary

Closes [panvex-6qi]. WCAG 2.3.3 / Apple HIG require custom keyframe animations to honour the OS reduced-motion preference. The ui-kit declares five infinite animations (breathe, blink, beacon-glow, led-blink, alert-pulse) that ran unconditionally.

Approach

Single global @media (prefers-reduced-motion: reduce) block at the bottom of web/src/ui-kit.css that collapses every animation/transition to one 0.001ms tick. Each of our five keyframes ends at its visible state at 100%, so iteration-count: 1 lands users on a sane static frame — particularly important for alert-pulse, whose 50% keyframe is transparent border.

scroll-behavior: auto !important also disables programmatic smooth scrolling for the same users.

Test plan

  • npx tsc --noEmit clean
  • npm run lint clean
  • Toggle "Reduce Motion" in macOS System Settings → Accessibility and confirm the dashboard's status pulses / led blinks freeze in their visible state
  • Verify alert-pulse border ends visible (var(--alert-color)), not transparent

🤖 Generated with Claude Code

Wraps every animation/transition in a global @media
(prefers-reduced-motion: reduce) block that collapses them to a single
0.001ms tick. Each --animate-* keyframe (breathe, blink, beacon-glow,
led-blink, alert-pulse) ends at its visible state, so iteration-count:1
lands users on a sane static frame instead of leaving e.g. alert-pulse
stuck on a transparent border.

Closes panvex-6qi (WCAG 2.3.3 / Apple HIG reduced-motion).
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