You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The CMSDS resets for users who enable prefers-reduced-motion are global, and can negatively affect 3rd-party libraries and components.
To Reproduce
In the process of upgrading from Mgov CMSDS v8 to v10 on MCT, we found that updates having to do with prefers-reduced-motion adversely affected our toast implementation using react-toastify.
When prefers-reduced-motion is on (set to reduce), toasts were disappearing after a matter of milliseconds instead of the 5-second default we've been using. We had to implement a workaround to deal with this issue (a fix which abides by the resets but sidesteps react-toastify's autoClose option, which is what broke).
We propose that the reset shouldn't be global, but instead applied selectively to components within the CMSDS component-class namespace (ds-c-).
Expected behavior
CMSDS resets should, ideally, not adversely affect 3rd-party libraries / components. Many libraries have their own way of implementing a prefers-reduced-motion option, and it should be left to the library or consuming application to implement.
Desktop (please complete the following information):
OS: macOS Sequoia 15.2, Windows 11
Browsers: Chrome, Safari, Firefox, Edge
Versions: Latest
Smartphone (please complete the following information):
Not tested
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
The CMSDS resets for users who enable prefers-reduced-motion are global, and can negatively affect 3rd-party libraries and components.
To Reproduce
In the process of upgrading from Mgov CMSDS v8 to v10 on MCT, we found that updates having to do with
prefers-reduced-motion
adversely affected our toast implementation using react-toastify.When
prefers-reduced-motion
is on (set toreduce
), toasts were disappearing after a matter of milliseconds instead of the 5-second default we've been using. We had to implement a workaround to deal with this issue (a fix which abides by the resets but sidesteps react-toastify'sautoClose
option, which is what broke).We propose that the reset shouldn't be global, but instead applied selectively to components within the CMSDS component-class namespace (
ds-c-
).Expected behavior
CMSDS resets should, ideally, not adversely affect 3rd-party libraries / components. Many libraries have their own way of implementing a
prefers-reduced-motion
option, and it should be left to the library or consuming application to implement.Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: