Skip to content

fix(layer): guard entry animations with prefers-reduced-motion (infra-6)#3414

Draft
cixzhang wants to merge 1 commit into
mainfrom
navi/fix/layer-animations-reduced-motion
Draft

fix(layer): guard entry animations with prefers-reduced-motion (infra-6)#3414
cixzhang wants to merge 1 commit into
mainfrom
navi/fix/layer-animations-reduced-motion

Conversation

@cixzhang

@cixzhang cixzhang commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Part of the accessibility & keyboard-management program (#3343). Fixes finding infra-6.

Problem

The shared popover/layer entry animations — Layer/layerAnimations.stylex.ts (translate + scale keyframes used by DropdownMenu, Popover, HoverCard, Tooltip, Selector and other layer surfaces) and the useEntryAnimation presets (slideDown/slideUp/fadeIn/scaleIn) — had no prefers-reduced-motion guard, unlike the ~20 individual components that do guard their motion. Users who ask for reduced motion still got sliding/scaling overlays.

Fix

Each animation now disables its keyframe under @media (prefers-reduced-motion: reduce) by setting animationName: 'none' in that media query (StyleX conditional value). The layer simply appears instead of translating/scaling in. No change for users without the preference.

Verification

Typecheck, lint, and the StyleX babel build all pass; DropdownMenu/Popover/Tooltip/HoverCard suites green (76 tests). Pure styling change (no behavior/test changes needed in the consumers).

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview, Comment Jul 2, 2026 11:46am

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.6KB 0B

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

github-actions Bot added a commit that referenced this pull request Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant