-
Notifications
You must be signed in to change notification settings - Fork 342
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
Adding reduced motion media query to disable notification animations. #34
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/timo/react-hot-toast/7y1NMgdmaDWJpesMQKJMncbwMmhp |
Great idea, thanks for bringing that up. However, it doesn't seem to work for me on the preview link. Does it work for you? |
Hey @timolins , Try now. Please ensure you have reduced motion set in your OS settings <3. |
Looks good, I made a quick comparison for you: |
@Kilian It looks good enough for me; Are you good with it? |
Hey cool React Hot Toast people!
The problem:
Animations are cool. Sometimes; animations are less than ideal for some users. MDN can explain this all the better. Currently React Hot Toast's animations don't obey the reduced motion media query that responds to the user's OS.
How this PR addresses the a11y issue:
On the
ToastBar
component I have disabled the transitions and animations in the event thatprefers-reduced-motion
media query is enabled.Please let me know if this is acceptable. Look forward to your feedback.