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

aria-labels

它能做什么

这项技能检查页面上所有交互元素是否都有清晰、描述性的名称。适合希望没有含糊按钮的网页开发者。

适用场景

  • ✓当你在页面中添加图标按钮、链接或小组件时。
  • ✓当控件使用“更多”或“点击这里”之类含糊的词语时。
  • ✓当你审查页面是否具备基本的无障碍名称时。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

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

repo: thedaviddias/Front-End-Checklist

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能