empty-links
它能做什么
这项技能检查网页上的链接是否缺少文字或文字不清楚。适用于希望链接人人都能理解的开发者。
适用场景
- ✓当屏幕阅读器只朗读“链接”一词,而没有任何上下文的时候。
- ✓当页面上的链接只有图标、没有文字描述的时候。
- ✓当你在上线前检查链接是否指向失效的目标的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/empty-links/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请检查我的页面中是否有没有可读文字的链接。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会查找既没有可见文字、也没有无障碍标签的链接。它会建议添加文字或 aria-label,并修复或删除失效的链接。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Fix empty and broken links
Screen readers announce empty links as just 'link' with no context—users have no idea where they lead or what they do, making navigation impossible.
Quick Reference
- Every link must have accessible text (visible or via aria-label)
- Icon-only links need aria-label describing the destination
- Empty anchor tags are completely inaccessible—always add content
- Use visually-hidden text when visual labels aren't desired
Check
Scan for links with no text content (empty anchor tags, icon-only links without labels). Verify all links have accessible names via text content, aria-label, or aria-labelledby. Check for broken link destinations.
Fix
Add descriptive text to empty links. For icon-only links, add aria-label describing the destination. Use visually-hidden text if visible labels are not desired. Remove or fix broken links.
Explain
Explain how screen readers announce empty links as just 'link' with no context, leaving users unable to understand where the link leads or what action it performs.
Code Review
Review the rendered markup and interactive states that affect Fix empty and broken links. 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/empty-links
常见问题
空链接为什么重要?
屏幕阅读器会把它朗读为“链接”,用户无法得知它通往哪里。
只有图标的链接怎么修复?
这项技能建议添加一个描述目标地址的 aria-label。
它会检查链接是否有效吗?
这项技能说明,除了检查缺少名称的链接,也会查找失效的链接目标。
详情
作者的原始描述
Use when reviewing rendered HTML, interactive components, or design-system patterns related to Fix empty and broken links. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.
热度
- GitHub 星标
- 75k
- 排名
- #2832
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。