Repository navigation
ActionList: respect prefers-reduced-motion for the multi-select checkmark - #8653
Open
adityalenova wants to merge 1 commit into
Open
adityalenova wants to merge 1 commit into
adityalenova wants to merge 1 commit into
Conversation
…mark The clip-path wipe on the multi-select checkbox is decorative - the mark is shown and hidden through `visibility` - so move the animation and the 230ms hide delay behind @media (prefers-reduced-motion: no-preference), the same way Skeleton, ProgressBar and SegmentedControl opt in to motion. With motion reduced the mark is simply present when the item is selected. The animated path keeps every declaration it uses today, including the clipped start value that covers the 80ms delay on checkmarkIn, so the rendered end state is unchanged and the existing baselines stay valid.
🦋 Changeset detectedLatest commit: 2884b42 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 |
adityalenova
requested review from
jonrohan
and
a balanced review from Copilot
October 31, 2026 12:02
siddharthkp
requested review from
siddharthkp
and removed request for
jonrohan
November 2, 2026 15:58
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Respect
prefers-reduced-motionfor the checkmark wipe on multi-selectActionListitems. Closes #8648..MultiSelectCheckbox::beforeanimatedcheckmarkOutunconditionally and the selected state animatedcheckmarkInunconditionally, so the clip-path wipe ran for visitors who asked for reduced motion. The wipe is decorative here — whether the mark is shown is decided byvisibility— so it belongs behind@media (prefers-reduced-motion: no-preference), the waySkeleton,ProgressBar,SegmentedControl,BreadcrumbsandTooltipV2already do it. This is the same change proposed forCheckboxin #8647, applied to the copy of that pattern that lives inActionList.How
Two details that keep the animated result byte-for-byte the same:
clip-pathinside the media query, becausecheckmarkInusesfill-mode: forwardswith an 80 ms delay and withoutbackwardsfill — without that, the mark would flash un-clipped before the wipe starts;transition: visibility 0s linear 230msmoves with the animation, so reduced motion hides the mark immediately instead of holding it visible for 230 ms.The default (
inset(0 0 0 0)) is the value the animation lands on, so with motion reduced the mark is simply present, and there is no state where a selected item shows no mark.Verification
The multi-select checkbox only renders when the list is not
role="menu"—Selectionfalls back to the single-select checkmark for menus — so the new e2e tests use theFilteredActionList > MultiSelectWithSelectAllstory, which is arole="listbox"list withselectionVariant="multiple".toHaveCSScannot target::before, so the tests read the computed style of the pseudo-element.reducedMotion: 'reduce'→animation-name: none,clip-path: inset(0px),visibility: visible; clicking the item off givesvisibility: hiddenandtransition-delay: 0s.reducedMotion: 'no-preference'→animation-namestill resolves tocheckmarkIn, and after unchecking,checkmarkOutwithtransition-delay: 0.23s.npx stylelint packages/react/src/ActionList/ActionList.module.cssreports no new problems (the one warning it prints is the pre-existing-webkit-tap-highlight-colorone further down the file), andnpx prettier --checkpasses on all three files.A changeset is included (
patch).Notes
No
ActionListstory renders.MultiSelectCheckboxwithrole="menu", so if you want a dedicated story for this state I can add one toActionList.features.stories.tsxinstead — say the word.