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

skip-navigation

它能做什么

这个技能检查页面顶部是否有可用键盘操作的跳过导航链接。它面向希望重复菜单易于跳过的网站构建者。

适用场景

  • ✓你请智能体为网站添加跳过导航链接的时候。
  • ✓页面有很长的菜单,键盘用户每次访问都必须经过它的时候。
  • ✓你在页面加载后立即按 Tab 键测试,并希望第一个停留点是跳过链接的时候。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请帮我在网站中添加“跳到主要内容”链接,让我可以用键盘跳过菜单吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会在页面顶部添加一个视觉上隐藏、获得焦点时才出现的链接。它使用 id 指向主要内容,并检查页面加载后立即按 Tab 键时,第一个停留的是否为该链接。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Include a skip navigation link

Skip links save keyboard and screen reader users from tabbing through 50+ navigation items on every page visit—turning a frustrating experience into an efficient one.

Quick Reference

  • Add a 'Skip to main content' link as the first focusable element
  • Hide visually but show on focus with CSS
  • Link to main content using id='main-content'
  • Test by pressing Tab immediately after page load

Check

Verify that a 'Skip to main content' link is present and functional at the beginning of the page.

Fix

Add a visually hidden skip link that becomes visible on focus and links to the main content area.

Explain

Explain how skip links improve efficiency for keyboard users by allowing them to bypass repeated navigation elements.

Code Review

Review the rendered markup and interactive states that affect Include a skip navigation link. 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/skip-navigation

常见问题

这为什么有用?

这个技能说,它可以让键盘用户和屏幕阅读器用户免于每个页面都要按 Tab 键经过大量导航项。

链接是如何隐藏的?

这个技能说,用 CSS 将其在视觉上隐藏,只在获得焦点时显示。

如何测试?

这个技能建议页面加载后立即按 Tab 键,并检查跳过链接是否为第一个停留点。

详情

作者的原始描述

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Include a skip navigation link. 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
排名
#3026
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能