navigation-landmark
它能做什么
这项技能检查导航菜单是否使用了带清晰标签的 nav 元素,并在有帮助的地方建议添加跳转链接。适用于希望网站便于辅助技术浏览的网页制作者。
适用场景
- ✓当你请智能体检查网站导航标记的时候。
- ✓当网站有多个菜单,而屏幕阅读器用户无法区分它们的时候。
- ✓当你在制作模板或共用页头,并希望其导航具有无障碍性的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/navigation-landmark/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我检查网站的菜单是否已标记为屏幕阅读器可识别的导航区域。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会查找导航链接,并检查它们是否包裹在 nav 元素中。它会添加 aria-label 或 aria-labelledby 值,使主菜单、次级菜单和页脚菜单易于区分。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Use navigation landmark regions
Navigation landmarks allow screen reader users to quickly jump to and identify different navigation areas—without them, users must tab through every link to find what they need.
Quick Reference
- Wrap navigation links in nav elements
- Use aria-label to distinguish multiple nav regions
- Provide skip links to bypass repetitive navigation
- Screen reader users navigate by landmarks
Check
Verify navigation areas use nav elements with aria-label or aria-labelledby to distinguish primary, secondary, and footer navigation.
Fix
Wrap navigation links in nav elements with descriptive aria-labels like 'Main navigation' or 'Footer navigation'.
Explain
Explain how navigation landmarks help screen reader users quickly identify and jump to different navigation areas.
Code Review
Review templates, server-rendered HTML, and shared components that output markup related to Use navigation landmark regions. Flag exact elements, attributes, and routes where the rendered HTML violates the rule.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/html/navigation-landmark
常见问题
什么是地标(landmark)?
地标是页面中的一个区域,例如导航区,屏幕阅读器用户可以直接跳转到那里。
为什么要给 nav 元素添加标签?
当页面有多个导航区域时,像 Main navigation 这样的标签可以帮助用户选择正确的区域。
这项技能会添加跳转链接吗?
这项技能提到可以提供跳转链接,让用户跳过重复出现的菜单。
详情
作者的原始描述
Use when reviewing templates, rendered HTML, or shared components related to Use navigation landmark regions. Validate the final browser-facing markup, not just the source framework abstraction.
热度
- GitHub 星标
- 75k
- 排名
- #2948
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。