AGENT SKILL
动效无障碍合规测试
wcag-audit-operable-motion-test
测试动画是否符合运动敏感性合规要求并支持减少动态效果偏好。
- License 许可
- MIT
- 最近更新
- 2026-01-19
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- wcag-audit-operable-motion-test
- description
- Test animations for motion sensitivity compliance and reduced motion preferences
02 资源文件 11
- 参考文档config.example.json285 B
- 参考文档references/gotchas.md1.5 KB
- 参考文档references/scaffolding-principles.md2.7 KB
- 参考文档references/shared-phases.md1.6 KB
- 参考文档references/workflow-auto.md2.7 KB
- 参考文档references/workflow-fast.md2.1 KB
- 参考文档references/workflow-full.md3.3 KB
- 参考文档references/workflow-parallel.md2.5 KB
- 脚本scripts/detect-stack.sh7.7 KB
- 脚本scripts/test.js7.2 KB
- 脚本scripts/validate-bootstrap.sh1.1 KB
03 SKILL.md 正文
When to Use
Use this tool when implementing animations, transitions, or moving content to ensure compliance with motion sensitivity guidelines and respect for user reduced motion preferences.
Usage
Command Line
node scripts/test.js --duration 3.5 --type parallax
node scripts/test.js --duration 2.0 --flashes 5 --reduced-motion true
node scripts/test.js --json '{"duration": 4.2, "type": "scroll", "flashes": 0}'
JSON Input
node scripts/test.js --json '{
"duration": 3.5,
"type": "carousel",
"flashes": 0,
"userPrefersReducedMotion": true
}'
Parameters
--duration: Animation duration in seconds--type: Animation type (scroll, parallax, carousel, transition, etc.)--flashes: Number of flashes per second (default: 0)--reduced-motion: Whether to simulate reduced motion preference (true/false)--json: JSON input with animation properties
Output
Returns JSON with compliance assessment and recommendations:
{
"animation": {
"duration": 3.5,
"type": "parallax",
"flashes": 0
},
"compliance": {
"reducedMotion": true,
"flashing": true,
"duration": false
},
"issues": ["Animation duration exceeds 5 seconds"],
"recommendations": [
"Provide option to pause or disable parallax scrolling",
"Consider using reduced motion alternative"
]
}
Examples
Test short animation
$ node scripts/test.js --duration 2.0 --type transition
✅ Reduced motion: RESPECTED
✅ Flashing: PASS (no flashes detected)
✅ Duration: PASS (2.0s within limit)
Animation meets accessibility requirements
Test long animation
$ node scripts/test.js --duration 8.5 --type carousel
⚠️ Reduced motion: NEEDS ATTENTION
✅ Flashing: PASS (no flashes detected)
❌ Duration: FAIL (8.5s exceeds 5s limit)
Recommendations:
- Provide pause/stop controls for auto-advancing carousel
- Consider shorter transition duration or user control
- Offer static alternative when reduced motion is preferred
Test flashing content
$ node scripts/test.js --duration 1.0 --flashes 4
✅ Reduced motion: RESPECTED
❌ Flashing: FAIL (4 flashes/s exceeds 3 flashes/s limit)
❌ Duration: PASS (1.0s within limit)
Recommendations:
- Reduce flashing frequency to maximum 3 flashes per second
- Consider non-flashing alternatives
- Test with users sensitive to flashing content
WCAG Standards
- Reduced Motion: Respect
prefers-reduced-motionuser preference - Flashing Limit: Maximum 3 flashes per second
- Auto-play Duration: Moving content should be pausable within 5 seconds
- User Control: Provide options to pause, stop, or hide moving content
- Alternatives: Offer static alternatives for animated content
Animation Types
Safe Types
- Fade transitions: Gradual opacity changes
- Slide transitions: Smooth position changes
- Scale transforms: Size changes without movement
Risk Types
- Parallax scrolling: Multiple layers moving at different speeds
- Auto-advancing carousels: Content that changes automatically
- Flashing elements: Rapid visibility changes
- Spinning animations: Rotational movement
Best Practices
- Check user preferences: Always respect
prefers-reduced-motion - Provide controls: Allow users to pause/stop animations
- Limit duration: Keep auto-playing content under 5 seconds
- Avoid flashing: Never exceed 3 flashes per second
- Test alternatives: Ensure functionality without animation
Learn More
For more information about Agent Skills and how they extend AI capabilities.
04 同仓库更多 Skills
表单输入无障碍审计
wcag-audit-understandable-forms
路由表单输入与数据收集的无障碍需求
★ 1
表单设计无障碍深度审计
wcag-audit-understandable-forms-deep
面向用户输入与数据收集的表单设计无障碍规则
★ 1
文本排版无障碍设计审计
wcag-audit-perceivable-text
路由排版无障碍设计决策与需求
★ 1
字体单位无障碍换算
wcag-audit-perceivable-text-size
结合无障碍上下文,在 px、pt、em、rem 单位之间进行转换
★ 1
文本排版无障碍深度审计
wcag-audit-perceivable-text-deep
面向文本设计与可读性的全面排版无障碍规则
★ 1
音视频多媒体无障碍审计
wcag-audit-perceivable-media
路由音频、视频和多媒体无障碍需求
★ 1