跳到正文
Skillpedia
网站与界面(前端)75k · #2740

aria-tooltip-name

它能做什么

这项技能检查工具提示元素是否有名称,或是否与它所描述的元素相关联。适合在按钮、图标或表单字段上显示提示的开发者。

适用场景

  • ✓当你用 tooltip 角色构建工具提示时。
  • ✓当工具提示的提示内容从未被屏幕阅读器读出时。
  • ✓当你审查共享的工具提示组件的无障碍性时。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/aria-tooltip-name/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/aria-tooltip-name/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#2740
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能