Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Breakpoint ordering can allow another matching breakpoint to override the reduced-motion safeguards.
1 open finding
What changed in this PR
Adds reduced-motion support to carousel animations and automatic playback.
Changes:
- Applies reduced-motion overrides to frontend and editor Embla options.
- Prevents Autoplay and Auto Scroll from starting automatically.
- Adds tests and accessibility documentation.
| File | Description |
|---|---|
src/blocks/carousel/viewport/edit.tsx |
Disables editor slide animation under reduced motion. |
src/blocks/carousel/view.ts |
Configures frontend transitions and playback behavior. |
src/blocks/carousel/embla-options.ts |
Adds the reduced-motion breakpoint helper. |
src/blocks/carousel/__tests__/view.test.ts |
Tests frontend reduced-motion options and state. |
src/blocks/carousel/__tests__/embla-options.test.ts |
Tests breakpoint construction and merging. |
README.md |
Documents reduced-motion support. |
readme.txt |
Updates plugin accessibility documentation. |
docs/API.md |
Documents runtime reduced-motion behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Under
prefers-reduced-motion: reduce, slide changes are instant and Autoplay / Auto Scroll do not start, including after interaction. Applied via Emblabreakpoints, so it follows the setting live;save()output is unchanged.Type of change
Related issue(s)
Closes #207
What changed
embla-options.ts:withReducedMotion()adds the reduced-motion breakpoint to core or plugin options.view.ts: coreduration: 0; Autoplay and Auto ScrollplayOnInit: false, stopOnInteraction: true;isPlayingset from both plugins after init.viewport/edit.tsx: editor slide changes are instant too.docs/API.md,README.md,readme.txt: reduced-motion notes.Breaking changes
Testing
Test details:
npm run test:js,npm run lint:js,npm run lint:js:types,npm run lint:css,npm run buildHow to test:
reduce.Checklist