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

navigation-landmark

它能做什么

这项技能检查导航菜单是否使用了带清晰标签的 nav 元素,并在有帮助的地方建议添加跳转链接。适用于希望网站便于辅助技术浏览的网页制作者。

适用场景

  • ✓当你请智能体检查网站导航标记的时候。
  • ✓当网站有多个菜单,而屏幕阅读器用户无法区分它们的时候。
  • ✓当你在制作模板或共用页头,并希望其导航具有无障碍性的时候。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

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

repo: thedaviddias/Front-End-Checklist

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能