Skip to content

Guard placeholder glow/wave animations behind prefers-reduced-motion - #42768

Merged
julien-deramond merged 1 commit into
v6-devfrom
v6-dev-jd-placeholder-animations-a11y
Jul 28, 2026
Merged

Guard placeholder glow/wave animations behind prefers-reduced-motion#42768
julien-deramond merged 1 commit into
v6-devfrom
v6-dev-jd-placeholder-animations-a11y

Conversation

@julien-deramond

@julien-deramond julien-deramond commented Jul 28, 2026

Copy link
Copy Markdown
Member

Description

.placeholder-glow and .placeholder-wave use an infinite 2s CSS animation to create their loading-shimmer effect. Unlike every other looping animation in the codebase, these two had no way to opt out for users who have prefers-reduced-motion: reduce set in their OS/browser. It's a real accessibility gap for anyone sensitive to motion.

This PR closes that gap by wrapping both animations in the same reduced-motion guard used elsewhere in the project.

  • .placeholder-glow's animation and .placeholder-wave's animation are now disabled (animation: none) inside @media (prefers-reduced-motion: reduce).
  • The guard is wrapped in @if $enable-reduced-motion so it can still be compiled out entirely via the existing Sass config flag, consistent with how _progress.scss, _spinner.scss, and the shared transition() mixin in mixins/_transition.scss already handle this.

Note

This might worth checking v5 to backport this modification if not already handled

How to test

On macOS, it's easily testable by enabling/disabling motion in Accessibility settings.

@github-project-automation github-project-automation Bot moved this to Inbox in v6.0.0 Jul 28, 2026
@julien-deramond
julien-deramond marked this pull request as ready for review July 28, 2026 20:39
@julien-deramond
julien-deramond requested a review from a team as a code owner July 28, 2026 20:39
@julien-deramond
julien-deramond merged commit 15cf3dc into v6-dev Jul 28, 2026
12 checks passed
@julien-deramond
julien-deramond deleted the v6-dev-jd-placeholder-animations-a11y branch July 28, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

1 participant