reduced-motion
它能做什么
这个技能检查网站动画是否遵循减少动效设置,并检查闪烁内容,必要时添加替代方案。它面向希望动画让所有人都感到舒适的前端开发者。
适用场景
- ✓你请智能体检查网站动画是否遵循减少动效设置的时候。
- ✓网站有闪烁或强烈动效,可能影响前庭障碍或癫痫患者的时候。
- ✓你在构建沉浸式动画网站,并希望提前加入警告和替代方案的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/reduced-motion/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我让网站的动画在访客开启减少动效时关闭或变得平缓吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会用减少动效的媒体查询包裹非必要的动画,并把运动效果替换为简单的透明度或颜色变化。它还会检查是否有内容每秒闪烁超过三次,并建议提供暂停动效的控件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Respect reduced motion preferences
Animations can trigger vestibular disorders, migraines, and seizures—respecting motion preferences makes your site usable for millions of affected users.
Quick Reference
- Use prefers-reduced-motion media query to disable non-essential animations
- Never flash content more than 3 times per second (seizure risk)
- Replace motion with opacity/color transitions when reduced motion is enabled
- Provide user controls to pause or disable animations
Check
Verify that animations respect prefers-reduced-motion, no content flashes more than 3 times per second, parallax and scrolljacking effects have alternatives, and motion warnings appear before pages with excessive animation.
Fix
Use @media (prefers-reduced-motion: reduce) to disable animations. Ensure no flashing exceeds 3 flashes/second. Avoid motion behind static text. Provide motion warnings for immersive experiences.
Explain
Explain how motion affects users with vestibular disorders, photosensitive epilepsy, and cognitive disabilities, and why providing motion controls and warnings is essential for inclusive design.
Code Review
Review the rendered markup and interactive states that affect Respect reduced motion preferences. Flag exact elements, roles, labels, focus behavior, or keyboard interactions that violate the rule, and note how to verify the fix with browser accessibility tooling or assistive tech.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/accessibility/reduced-motion
常见问题
减少动效设置是什么?
它是一种系统偏好,请网站限制动效;这个技能用它来决定关闭哪些动画。
为什么要限制闪烁?
这个技能说,每秒闪烁超过三次可能引发癫痫。
访客应该有自己的控制选项吗?
应该。这个技能建议让用户可以在网站上暂停或关闭动画。
详情
作者的原始描述
Use when reviewing rendered HTML, interactive components, or design-system patterns related to Respect reduced motion preferences. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.
热度
- GitHub 星标
- 75k
- 排名
- #2991
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。