- Issue created by @quicksketch
- π³π΄Norway svenryen
If it's ok for you, I'll change the version to 1.x.
We're deprecating 2.0 since we're supporting the Klaro! initiative.
The GDPR cookie compliance banner currently has an animation effect by default. It would be nice if this animation were conditional based on whether the browser has passed a "prefers-reduced-motion" media query.
See the MDN documentation on prefers-reduced-motion to see how to enable this feature in most browsers.
One challenge is that this feature is only available in CSS. EU Cookie Compliance module would probably be better off using CSS animations anyway instead of the jQuery $.animate()
function, but if it is easier to continue using JavaScript to do the animation, the prefers-reduced-motion value can be retrieved via a JavaScript trick as well.
Although I think this option would be good to comply with user preferences and possibly to improve accessibility, the primary reason I would like this feature is so that visual regression testing software (such as Tugboat) already pass the "prefers-reduced-motion" setting when running testing, and this would make it so that EU Cookie Compliance module would not be constantly causing false positives in test failures.
Option 1: Switch to using CSS animation and use the @media (prefers-reduced-motion) {
media query.
Option 2: Detect the media query with JavaScript and set the animation time to 0 if prefers-reduced-motion is "reduce".
None.
None.
None.
Active
2.0
Code
If it's ok for you, I'll change the version to 1.x.
We're deprecating 2.0 since we're supporting the Klaro! initiative.