Problem Statement
Animations and motion effects can be visually distracting or even cause physical discomfort (e.g., motion sickness, vestibular disorders) for some users. The current scroll-driven animations in the plugin do not respect the user's operating system preference for reduced motion, potentially leading to a poor user experience for these individuals.
Proposed Solution
Implement support for the prefers-reduced-motion media query to disable or significantly reduce scroll-driven animations when a user has this preference enabled in their operating system settings.
This can be achieved by:
- CSS-only Approach: Utilizing
@media (prefers-reduced-motion: reduce) in the CSS to override animation properties. This is the most efficient method given the project's pure-CSS animation strategy.
- Conditional Class/Attribute: Adding a class or data attribute to the
body or animated elements when prefers-reduced-motion is detected (if JavaScript is necessary for other parts of the system, though ideally this would be CSS-driven).
The ideal solution would leverage pure CSS to respond to this media query, aligning with the project's existing animation philosophy.
Documentation Reference
For more information on prefers-reduced-motion and its implementation, please refer to:
https://web.dev/articles/prefers-reduced-motion
Acceptance Criteria
- When a user has
prefers-reduced-motion: reduce enabled in their OS settings, all scroll-driven animations (including parallax and other effects) provided by this plugin should be either:
- Completely disabled, or
- Replaced with a significantly simpler, non-moving effect (e.g., a simple fade-in instead of a slide-in or scale-up).
- The implementation should primarily use CSS to respect the
prefers-reduced-motion media query.
- The change should be tested on platforms that support
prefers-reduced-motion (e.g., macOS, Windows).
Problem Statement
Animations and motion effects can be visually distracting or even cause physical discomfort (e.g., motion sickness, vestibular disorders) for some users. The current scroll-driven animations in the plugin do not respect the user's operating system preference for reduced motion, potentially leading to a poor user experience for these individuals.
Proposed Solution
Implement support for the
prefers-reduced-motionmedia query to disable or significantly reduce scroll-driven animations when a user has this preference enabled in their operating system settings.This can be achieved by:
@media (prefers-reduced-motion: reduce)in the CSS to override animation properties. This is the most efficient method given the project's pure-CSS animation strategy.bodyor animated elements whenprefers-reduced-motionis detected (if JavaScript is necessary for other parts of the system, though ideally this would be CSS-driven).The ideal solution would leverage pure CSS to respond to this media query, aligning with the project's existing animation philosophy.
Documentation Reference
For more information on
prefers-reduced-motionand its implementation, please refer to:https://web.dev/articles/prefers-reduced-motion
Acceptance Criteria
prefers-reduced-motion: reduceenabled in their OS settings, all scroll-driven animations (including parallax and other effects) provided by this plugin should be either:prefers-reduced-motionmedia query.prefers-reduced-motion(e.g., macOS, Windows).