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

breadcrumb-navigation

它能做什么

这项技能检查面包屑导航的标记是否便于屏幕阅读器理解。适合添加显示页面在网站中位置的导航路径的开发者。

适用场景

  • ✓当你在页面模板中添加面包屑导航时。
  • ✓当面包屑只是纯文字,没有使用 list 或 nav 元素时。
  • ✓当你审查导航路径中当前页面的标记方式时。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请让我的产品页面上的面包屑导航具有无障碍性,并正确标明当前页面。”

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

工作原理

智能体会把导航路径包裹在标有 Breadcrumb 的 nav 元素中,使用有序列表,并把最后一项的 aria-current 设为 page。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Implement accessible breadcrumb navigation

Proper breadcrumb markup helps screen reader users understand site hierarchy and their current location, while also improving SEO through structured data.

Quick Reference

  • Use nav element with aria-label='Breadcrumb'
  • Use ordered list (ol) for semantic structure
  • Mark current page with aria-current='page'
  • Keep any structured data aligned with the visible breadcrumb trail

Check

Verify breadcrumbs use nav element with aria-label, ordered list markup, and aria-current for the current page.

Fix

Implement breadcrumbs using semantic nav, ol/li structure, and proper ARIA attributes including aria-current='page'.

Explain

Explain how properly marked up breadcrumbs improve navigation, SEO, and screen reader accessibility.

Code Review

Review templates, server-rendered HTML, and shared components that output markup related to Implement accessible breadcrumb navigation. 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/breadcrumb-navigation

常见问题

aria-current 设为 page 有什么作用?

它告诉屏幕阅读器,导航路径中的哪一项是当前页面。

为什么使用有序列表?

这项技能说明,它为面包屑导航提供了清晰、有语义的结构。

结构化数据应该与可见的面包屑一致吗?

应该。这项技能说明,任何结构化数据都应与可见的面包屑导航相符。

详情

作者的原始描述

Use when reviewing templates, rendered HTML, or shared components related to Implement accessible breadcrumb navigation. Validate the final browser-facing markup, not just the source framework abstraction.

repo: thedaviddias/Front-End-Checklist

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能