Skip to content

d2svg: respect reduced motion for animated connections#2778

Draft
coyaSONG wants to merge 2 commits into
terrastruct:masterfrom
coyaSONG:fix/1979-reduced-motion-connections
Draft

d2svg: respect reduced motion for animated connections#2778
coyaSONG wants to merge 2 commits into
terrastruct:masterfrom
coyaSONG:fix/1979-reduced-motion-connections

Conversation

@coyaSONG

@coyaSONG coyaSONG commented Jul 14, 2026

Copy link
Copy Markdown

Summary

  • add a prefers-reduced-motion: reduce override for animated SVG connections
  • keep the override conditional so static diagrams and default animation behavior are unchanged
  • cover the generated CSS directly and update every affected renderer/E2E snapshot
  • add d2svg: respect reduced motion for animated connections #2778 to the next release changelog

Why

Animated connection paths receive their animation through an inline style. The reduced-motion rule therefore uses animation: none !important on .animated-connection so the operating-system accessibility preference reliably wins without changing the normal rendered output.

Validation

  • ./make.sh lint with the repository-pinned Go 1.25.0 toolchain
  • ./make.sh build with the repository-pinned Go 1.25.0 toolchain
  • targeted unit, Dagre/ELK, sketch, dark-theme, bidirectional, and Markdown renderer tests
  • ./make.sh test: all core packages and the complete e2etests package pass; the remaining e2etests-cli failures are unrelated external-fixture issues (changed remote icon bytes and a Playwright 1.52 driver URL returning 404)

Implementation and validation were assisted by OpenAI Codex; I reviewed the resulting diff and test output.

Fixes #1979

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.

Animated connections don't honor prefers-reduced-motion

1 participant