aria-labels
它能做什么
这项技能检查页面上所有交互元素是否都有清晰、描述性的名称。适合希望没有含糊按钮的网页开发者。
适用场景
- ✓当你在页面中添加图标按钮、链接或小组件时。
- ✓当控件使用“更多”或“点击这里”之类含糊的词语时。
- ✓当你审查页面是否具备基本的无障碍名称时。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/aria-labels/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请审查我的仪表盘,告诉我哪些按钮和链接需要更好的标签。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查每个控件是否有文字名称、aria-label 或 aria-labelledby,并为缺失或含糊的名称建议简短、清晰的名称。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Provide accessible names for all interactive elements
Interactive elements are the core of web navigation; without names, they become 'mystery meat' that users cannot confidently interact with.
Quick Reference
- Buttons, links, and other controls must have a discernable name
- Names should be concise and describe the action or destination
- Avoid generic names like 'Click Here' or 'More'
Check
Audit all interactive elements (buttons, links, widgets) for missing or unhelpful accessible names.
Fix
Add descriptive text content or aria-label attributes to all interactive elements.
Explain
Explain how clear labels on interactive elements improve accessibility and general usability.
Code Review
Review the rendered markup and interactive states that affect Provide accessible names for all interactive elements. 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/aria-labels
常见问题
什么样的控件名称才好?
这项技能建议使用简洁的名称,描述操作或目标,而不是“更多”这类笼统的词。
可见文字可以作为名称吗?
可以。描述性的文字内容可以作为无障碍名称。
为什么这项技能要提醒避免含糊的控件?
没有名称的话,用户只能靠猜测来判断控件的作用。
详情
作者的原始描述
Use when reviewing rendered HTML, interactive components, or design-system patterns related to Provide accessible names for all interactive elements. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.
热度
- GitHub 星标
- 75k
- 排名
- #2730
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。