pagination-accessibility
它能做什么
这个技能检查分页控件是否使用了正确的标记,并且可以用键盘和屏幕阅读器操作。它面向构建分页列表或搜索结果的前端开发者。
适用场景
- ✓你请智能体审查页面分页控件的无障碍性的时候。
- ✓屏幕阅读器用户无法判断自己在分页列表的哪一页的时候。
- ✓你在构建通用分页组件,并希望它遵循无障碍基本规范的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/pagination-accessibility/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我检查产品列表底部的页码对屏幕阅读器是否友好吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查分页是否位于带有清晰标签的 nav 元素内,是否用 aria-current 标明当前页,以及上一页和下一页按钮是否有清晰的标签。它还会确认这些控件可以用键盘操作。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Make pagination accessible
Without proper markup, screen reader users cannot understand which page they're on or navigate efficiently through paginated content.
Quick Reference
- Use nav element with aria-label='Pagination'
- Mark current page with aria-current='page'
- Provide clear labels for previous/next buttons
- Announce page changes to screen readers
Check
Verify pagination uses nav element with aria-label, indicates current page with aria-current, and is keyboard navigable.
Fix
Implement pagination with nav role='navigation', aria-label, aria-current='page' for active page, and focusable controls.
Explain
Explain how accessible pagination helps screen reader users understand their position and navigate through paged content.
Code Review
Review templates, server-rendered HTML, and shared components that output markup related to Make pagination 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/pagination-accessibility
常见问题
aria-current 在这里起什么作用?
它告诉辅助技术哪一页是当前页,让用户知道自己所在的位置。
页面切换时应该进行播报吗?
应该。这个技能说,页面切换时应告知屏幕阅读器。
标签重要吗?
重要。这个技能建议在 nav 元素上使用 aria-label='Pagination'。
详情
作者的原始描述
Use when reviewing templates, rendered HTML, or shared components related to Make pagination accessible. Validate the final browser-facing markup, not just the source framework abstraction.
热度
- GitHub 星标
- 75k
- 排名
- #2968
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。