aria-tooltip-name
它能做什么
这项技能检查工具提示元素是否有名称,或是否与它所描述的元素相关联。适合在按钮、图标或表单字段上显示提示的开发者。
适用场景
- ✓当你用 tooltip 角色构建工具提示时。
- ✓当工具提示的提示内容从未被屏幕阅读器读出时。
- ✓当你审查共享的工具提示组件的无障碍性时。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/aria-tooltip-name/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请确保我信息图标上的工具提示在图标获得焦点时能被屏幕阅读器读出。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查每个工具提示是否有名称,或是否被其触发元素通过 aria-describedby 引用,并修复任何未关联的工具提示。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Provide accessible names for tooltips
Tooltips often contain essential information; if they aren't properly named or associated with an element, that information remains hidden from screen reader users.
Quick Reference
- Tooltips must have an accessible name or be referenced by
aria-describedby - Ensure the tooltip content is actually accessible to assistive technology
- Verify that tooltips are correctly associated with their trigger elements
Check
Verify that all elements with role="tooltip" have an accessible name or are linked to a trigger element via aria-describedby.
Fix
Assign an accessible name to the tooltip or ensure it is correctly referenced by the element it describes.
Explain
Explain how to correctly associate tooltips with triggers so that screen readers announce the extra information.
Code Review
Review the rendered markup and interactive states that affect Provide accessible names for tooltips. 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-tooltip-name
常见问题
屏幕阅读器如何使用工具提示?
这项技能说明,正确的关联能让屏幕阅读器在触发元素上读出额外信息。
这里 aria-describedby 有什么用?
它把触发元素与工具提示关联起来,使提示文字能与控件一同被读出。
这项技能只检查工具提示的名称和关联吗?
是的。它关注的是名称和关联,而不是工具提示如何打开。
详情
作者的原始描述
Use when reviewing rendered HTML, interactive components, or design-system patterns related to Provide accessible names for tooltips. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.
热度
- GitHub 星标
- 75k
- 排名
- #2740
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。