Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(spinner): slow rotation under prefers-reduced-motion (obs-6) (#3418)

Cindy Zhang0ea7732cadb1
diff --git a/.changeset/spinner-reduced-motion.md b/.changeset/spinner-reduced-motion.md
new file mode 100644
index 0000000000..cbfdac33ba
--- /dev/null
+++ b/.changeset/spinner-reduced-motion.md
@@ -0,0 +1,6 @@
+---
+'@astryxdesign/core': patch
+---
+
+[fix] Spinner: the rotation animation now slows substantially under `prefers-reduced-motion: reduce` (matching ProgressBar) instead of spinning unconditionally. The `role="status"` "Loading" announcement still conveys busy state (#3343).
+@cixzhang
diff --git a/packages/core/src/Spinner/Spinner.tsx b/packages/core/src/Spinner/Spinner.tsx
index c349cd9bdb..da12da1905 100644
--- a/packages/core/src/Spinner/Spinner.tsx
+++ b/packages/core/src/Spinner/Spinner.tsx
@@ -70,7 +70,13 @@ const styles = stylex.create({
canvas: {
backfaceVisibility: 'hidden',
display: 'block',
- animationDuration: durationVars['--duration-slow-min'],
+ // Slow the rotation dramatically under reduced-motion rather than freezing
+ // it (a frozen spinner reads as broken), matching ProgressBar's approach.
+ // The role="status" + "Loading" label still convey busy state (obs-6).
+ animationDuration: {
+ default: durationVars['--duration-slow-min'],
+ '@media (prefers-reduced-motion: reduce)': '3s',
+ },
animationIterationCount: 'infinite',
animationName: rotation,
animationTimingFunction: 'linear',