–:HTML 区域标题元素
:HTML 区域标题元素
导航
对于使用屏幕阅读软件的用户而言,一种常见的导航方式是从一个标题跳到另一个标题,以快速确定页面的内容。因此,不要跳过一个或多个标题级别。因为这样做可能会造成混乱,使用户困惑于缺少的标题在哪里。
错误用法
html
Heading level 1
Heading level 3
Heading level 4
正确用法
html
Heading level 1
Heading level 2
Heading level 3
嵌套
标题可以嵌套其小节,以反映页面的结构。大多数屏幕阅读器可以生成页面上所有标题的列表,从而帮助用户快速确定内容的层次结构:
h1 Beetles
h2 Etymology
h2 Distribution and Diversity
h2 Evolution
h3 Late Paleozoic
h3 Jurassic
h3 Cretaceous
h3 Cenozoic
h2 External Morphology
h3 Head
h4 Mouthparts
h3 Thorax
h4 Prothorax
h4 Pterothorax
h3 Legs
h3 Wings
h3 Abdomen
当小节中嵌套子标题时,若关闭了某个小节,则其中的嵌套的子标题可能会被“跳过”。
Headings • Page Structure • WAI Web Accessibility Tutorials
MDN Understanding WCAG, Guideline 1.3 explanations
Understanding Success Criterion 1.3.1 | W3C Understanding WCAG 2.0
MDN Understanding WCAG, Guideline 2.4 explanations
Understanding Success Criterion 2.4.1 | W3C Understanding WCAG 2.0
Understanding Success Criterion 2.4.6 | W3C Understanding WCAG 2.0
Understanding Success Criterion 2.4.10 | W3C Understanding WCAG 2.0