Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/reduced-motion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@executor-js/react": patch
---

fix: honor prefers-reduced-motion in the shared stylesheet

Adds a `prefers-reduced-motion: reduce` block to the global stylesheet that
caps transition/animation durations to 0.01ms and disables smooth scrolling,
so motion-sensitive users get a stable UI. The loading spinner renders
statically under reduced motion (its meaning is preserved via `role="status"`).
21 changes: 21 additions & 0 deletions packages/react/src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -294,3 +294,24 @@
opacity: 0.25;
}
}

/* ---------------------------------------------------------------------------
* Reduced motion — WCAG 2.2 (motion-sensitive users).
*
* Neutralizes transitions/animations/scroll-behavior when the OS requests
* reduced motion, per the standard modern-CSS-reset pattern. The spinner
* (ios-spinner-fade) is capped to a single 0.01ms iteration — effectively
* static — which is the standard behavior: its meaning is preserved by
* `role="status"` (announced by assistive tech), and an opacity pulse would
* be a non-motion affordance but is not required for reduced-motion users.
* ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
Loading