heading-order
它能做什么
这项技能检查页面中的标题是否没有跳级,例如从主标题直接跳到三级标题。适用于构建页面模板的开发者。
适用场景
- ✓当模板在主标题后面直接使用三级标题的时候。
- ✓当组件以错误的级别渲染标题的时候。
- ✓当你在发布前审查渲染后的 HTML 的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/heading-order/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请检查我的标题是否跳过了级别。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查每个标题是否紧接在前一个标题之后,依序排列。在出现跳级的地方,它会建议把标题改为正确的级别。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Maintain logical heading order
A logical heading structure allows screen reader users to navigate the page content efficiently and helps all users understand the relationship between different sections.
Quick Reference
- Use heading levels (
<h1>-<h6>) in sequential order - Do not skip heading levels (e.g.,
<h1>followed by<h3>) - Ensure the document structure is logical and hierarchical
Check
Check the heading structure of the page to ensure that heading levels are not skipped (e.g., check that an <h2> follows an <h1>).
Fix
Adjust the heading levels to ensure a correct hierarchy (e.g., change an <h3> to an <h2> if it follows an <h1>).
Explain
Explain how a consistent heading hierarchy aids navigation for screen reader users who rely on heading lists to understand page layout.
Code Review
Review the rendered markup and interactive states that affect Maintain logical heading order. 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/heading-order
常见问题
为什么标题顺序重要?
屏幕阅读器使用标题来说明页面布局,一致的顺序有助于用户理解各章节之间的关系。
这和标题层级检查是一回事吗?
两者密切相关。这项检查专注于渲染后 HTML 中被跳过的级别。
它会检查标题的措辞吗?
这项技能专注于标题级别。标题文字只会被检查,以确认它能描述其后的内容。
详情
作者的原始描述
Use when reviewing rendered HTML, interactive components, or design-system patterns related to Maintain logical heading order. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.
热度
- GitHub 星标
- 75k
- 排名
- #2867
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。