-
Notifications
You must be signed in to change notification settings - Fork 545
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
[checkbox] Show Checkmark to users with reduced-motion enabled #3537
Conversation
🦋 Changeset detectedLatest commit: a7ada69 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
Updating tests now... |
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.
Very nice! ✨
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.
Just wanted to double-check, this seems to include the animation if prefers-reduced-motion
is true. Would another possible path here be to add the following declaration to the checked -> before selector:
&:checked,
&:indeterminate {
background: ${get('colors.accent.fg')};
border-color: ${get('colors.accent.fg')};
&::before {
+ clip-path: inset(0 0 0 0);
@media screen and (prefers-reduced-motion: no-preference) {
animation: checkmarkIn 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards 80ms;
}
}
}
So that it still appears with prefers-reduced-motion set but without the animation 👀
@joshblack The animation is very minimal, I think it would be okay to leave in the motion for reduced-motion users. @ericwbailey or @ichelsea could you also weigh in? |
My take is that the animation is minimal and user-initiated. I'd feel comfortable removing the query. |
@kendallgassner I agree with Eric! |
When testing Stylelint-a11y rules I noticed that our Checkbox component does not show the checkmark when reduced motion is turned on:
Closes # (type the issue number after # if applicable; otherwise remove this line)
Screenshots
Please provide before/after screenshots for any visual changes
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.