Add support for prefers-reduced-motion
Improve user accessibility by disabling animations based on the user's preferences.
Links that might be helpful https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion https://webkit.org/blog/7551/responsive-design-for-motion/ https://web.dev/prefers-reduced-motion/
Thank you for submitting this PR. I think that implementation of reduced motion support is not yet ready for sal.js. We need to check for reduced motion on load, but also when it changes. This requires adding a change listener. In my opinion, it's too much for such small library. Additionally, nothing stops a developer adding such kind of support by themselves. There's a required API (disable and enable methods), so this feature can be implemented outside of sal.
I do like your changes in README, so I'd like to ask you to create a separate PR with documentation changes. I appreciate it. Thank you!
Hi Mirek,
I think as we build a library that doing some specific work, our responsibility to implement all cases not throw it to other people. your concern about the library size, we can add features and keep the library small as you need.
about adding change listener support I didn't add it because I assumed
that nobody gonna change the preferences while browsing but definitely we
should implement it. I agree with you.
P.S I don't have access to my personal laptop for a while. unfortunately, I can't help you with adding the changes in the README file in separate PR. You can checkout the branch and cherry-pick the commit and make it happen. sorry again
On Sun, Oct 4, 2020 at 7:29 PM Mirek Ciastek [email protected] wrote:
Thank you for submitting this PR. I think that implementation of reduced motion support is not yet ready for sal.js. We need to check for reduced motion on load, but also when it changes. This requires adding a change listener. In my opinion, it's too much for such small library. Additionally, nothing stops a developer adding such kind of support by themselves. There's a required API (disable and enable methods), so this feature can be implemented outside of sal.
I do like your changes in README, so I'd like to ask you to create a separate PR with documentation changes. I appreciate it. Thank you!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mciastek/sal/pull/61#issuecomment-703288263, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGIXNFRPHCZWXMBVXBJVNDSJCWGPANCNFSM4R66UCJQ .