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

heading-order

它能做什么

这项技能检查页面中的标题是否没有跳级,例如从主标题直接跳到三级标题。适用于构建页面模板的开发者。

适用场景

  • ✓当模板在主标题后面直接使用三级标题的时候。
  • ✓当组件以错误的级别渲染标题的时候。
  • ✓当你在发布前审查渲染后的 HTML 的时候。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

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

repo: thedaviddias/Front-End-Checklist

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能