可以跳过标题级别吗? [英] Is it OK to skip heading levels

查看:167
本文介绍了可以跳过标题级别吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直不赞成在HTML文档中跳过标题级别,尤其是出于屏幕阅读器可访问性的原因。此外,要求页面的结构在没有CSS的情况下有意义,这似乎表明不建议跳过标题级别。例如:

 < h1> ...< / h1> 
< h3> ...< / h3>
< h4> ...< / h4>

一位同事声称,如果内容的相对重要性反映在标题标记中,那就没有问题。我想他可能是对的。



来自可访问性专家的想法?

解决方案

<我相信在WCAG1下跳过标题水平被认为是可以接受的但并不理想,但WCAG2在这方面更严格。举例来说,屏幕阅读器会公布标题级别,而跳过的数字会使用户看起来好像没有隐藏内容。如果使用CSS来按照自己喜欢的方式进行样式设置,则不需要跳过关卡。

I've always frowned upon skipping heading levels in HTML documents, especially for reasons of screenreader accessibility. Additionally the requirement that a page's structure makes sense without CSS seems to indicate that skipping heading levels is not advised. For example:

<h1>...</h1>
<h3>...</h3>
<h4>...</h4>

A coworker claims that this is fine if the relative importance of the content is reflected in the heading markup. I suppose he could be right.

Thoughts from accessiblity experts?

解决方案

I believe skipping heading levels was considered acceptable but not ideal under WCAG1, but WCAG2 is stricter in this regard. As one example, screen readers will announce the heading level and the skipped number would make it seem like the user had missed some hidden content when they haven't. There shouldn't be any need to skip a level if CSS is used to style the way you'd like.

这篇关于可以跳过标题级别吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆