-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SHS-4047: A11y: Adjust slide transition based on user's Reduced Motion Preference #1450
SHS-4047: A11y: Adjust slide transition based on user's Reduced Motion Preference #1450
Conversation
… SHS-4047-a11y-adjust-slide-transition
$(slickInstance).on('beforeChange', (event, slick) => { | ||
slick.slickSetOption('cssEase', 'none', true); | ||
}); | ||
} else { | ||
$(slickInstance).on('beforeChange', (event, slick) => { | ||
slick.slickSetOption('cssEase', 'ease', true); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While testing more, I found out the library already does this by default (remove animations at all). Test in a different branch/env.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's how it looks with the fade transition https://www.loom.com/share/60fb89ed8d80476da5dec32de826b5f8?sid=16e771f5-96cb-4796-a1c0-da7c8edfd068
… SHS-4047-a11y-adjust-slide-transition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariannuar Works great! Just fix a minor coding issue and we're done 🙂
(function ($, Drupal, window) { | ||
Drupal.behaviors.mySlickBehavior = { | ||
// eslint-disable-next-line no-unused-vars | ||
attach(context, settings) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're not using the settings
argument, just remove it. That way you don't need the eslint-disable
…-HSDO/suhumsci into SHS-4047-a11y-adjust-slide-transition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
READY FOR REVIEW
Summary
Need Review By (Date)
02/09
Urgency
medium
Steps to Test
System Settings
>Accessibility
>Display
Banner Image(s) with Partial Overlay (with multiple slides)
Banner Image(s) with Text Box (with multiple slides)
Spotlight (with multiple slides)
Photo Album (in Slider mode)
PR Checklist