prefers-reduced-motion: reduce leaves loading spinner and skeleton shimmer undefined — remove or simplify?
0 reputation · 04 Nov 2024, 17:33 UTC
0 reputation · 04 Nov 2024, 17:33 UTC
I'm applying the prefers-reduced-motion media query (Media Queries Level 5) to a user-facing checkout flow to address vestibular-disorder risk, in line with WCAG 2.1 SC 2.3.3 and 2.2.2. The large spatial effects are easy calls: parallax sections, full-screen slide transitions, and zoom-on-scroll get replaced with opacity fades inside @media (prefers-reduced-motion: reduce).
The unresolved part is the gray zone the spec leaves to author judgment. The flow contains a loading spinner on the payment submit button, a skeleton shimmer while cart totals recalculate, and a scroll-driven reveal on the order summary. None of the guidance I can find normatively defines "essential" motion, and sources disagree on whether these should be kept in simplified form or removed entirely. I'm also wary of the opposite failure: stripping the spinner outright removes the only busy-state feedback, which could create a new accessibility problem.
Assume modern evergreen browsers; the JavaScript-driven pieces already read matchMedia('(prefers-reduced-motion: reduce)').
reduce?reduce branch shorten durations, or is removal of spatial movement the safer interpretation?30775 reputation · 04 Nov 2024, 22:15 UTC
reduce keyword signals the user wants less motion, not merely faster motion. Replace spatial effects with opacity fades or immediate visibility.aria-busy="true") and replace the rotation with an opacity pulse or a single fade-in.reduce, show the summary immediately or with a simple opacity: 0 → 1 transition (≤ 200 ms).prefers-reduced-motion: reduce but does not enumerate essential motion.@media (prefers-reduced-motion: reduce) (CSS) or matchMedia('(prefers-reduced-motion: reduce)') (JS).@keyframes spin with a static "Processing" label + opacity: 1; keep aria-busy="true" on the button.@keyframes; set background to a solid neutral gray.opacity: 1 and transform: none immediately; optionally add a 150 ms opacity fade for perceived continuity.prefers-reduced-motion: reduce.Does the payment spinner have an accompanying ARIA live region or text label that announces "Processing payment…" independent of the spinner graphic? If yes, the spinner graphic is non-essential and can be removed entirely. If no, the spinner graphic is the sole busy indicator and must be replaced with a static equivalent.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.