carousel-accessibility
它能做什么
这项技能检查轮播图和幻灯片能否暂停、能否用键盘操作,以及屏幕阅读器能否理解。适合在网站上构建滑块的开发者。
适用场景
- ✓当你的网站有一个会自动轮播的轮播图时。
- ✓当键盘用户无法在幻灯片之间切换时。
- ✓当屏幕阅读器用户错过了幻灯片的切换时。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/carousel-accessibility/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请让我首页的主视觉幻灯片可以暂停,并能用方向键操作。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会添加暂停和播放控件、方向键导航,以及用于播报幻灯片切换的 live region,并检查减少动态效果的设置。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Make carousels accessible
Auto-playing carousels without controls trap users, cause disorientation, and violate WCAG requirements—proper implementation ensures all users can interact with slideshow content.
Quick Reference
- Always provide pause/stop controls for auto-rotating carousels
- Support keyboard navigation with arrow keys and tab
- Use aria-live regions to announce slide changes
- Respect prefers-reduced-motion preference
Check
Verify carousels have pause/play controls, keyboard navigation, proper ARIA roles, and respect prefers-reduced-motion.
Fix
Implement carousels with pause buttons, arrow key navigation, aria-live for announcements, and motion preference support.
Explain
Explain accessibility requirements for carousels including auto-play controls, keyboard access, and screen reader support.
Code Review
Review templates, server-rendered HTML, and shared components that output markup related to Make carousels accessible. Flag exact elements, attributes, and routes where the rendered HTML violates the rule.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/html/carousel-accessibility
常见问题
为什么自动轮播的轮播图需要暂停控件?
这项技能说明,没有暂停控件,它们可能会让用户无法离开,造成迷失感,并且不符合无障碍要求。
屏幕阅读器如何知道出现了新的幻灯片?
这项技能建议使用 aria-live 区域来播报幻灯片的切换。
它应该尊重动态设置吗?
应该。这项技能说明要遵循 prefers-reduced-motion 设置。
详情
作者的原始描述
Use when reviewing templates, rendered HTML, or shared components related to Make carousels accessible. Validate the final browser-facing markup, not just the source framework abstraction.
热度
- GitHub 星标
- 75k
- 排名
- #2768
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。