多个h1会导致屏幕阅读器出现问题吗? [英] Do multiple h1's cause screen readers problems?

查看:140
本文介绍了多个h1会导致屏幕阅读器出现问题吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我放置一个通过W3C检查器构建的网站时,它要求我考虑仅使用h1作为顶级标题,并指出我在一个区域内有h1的部分。它还提到屏幕阅读器会将它们全部视为顶级元素,但是,根据HTML5规范,部分有效地重置标题,以便您可以从其中的1-6开始另一个层次结构。

When I put a website I am building through a W3C checker it asks me to consider only using h1's as a top level heading and points out a section where I have a h1 inside of a section. It also mentions that screen readers will treat them all as top level elements, however, according to HTML5 specs, sections effectively "reset" the headings so you can start another hierarchy from 1-6 within them.

如果我们试图专注于W3C验证和可访问性,我应该只在部分内使用h2-h6吗?或者这个警告是不正确的?

Should I only be using h2-h6 within sections if we are trying to focus on W3C validation and accessibility? Or is this warning incorrect?

推荐答案

尽管事实上,无论何时重置标题级别,遵循您使用的工具给出的建议并实施正确的标题层次结构是一种很好的习惯。

Despite the fact that it's not gramatically incorrect to reset headings level whenever you have a new section, it's a good habit to follow the advice given by the tool you are using and implement a heading hierarchy correctly structured within the full document.

例如,一些屏幕阅读器可能会给你可以使用某种快捷方式使用某个快捷方式访问下一个 h1 标题,并且不能假定每个屏幕阅读器的实现都是相同的。有些人可能选择在同一部分中进入下一个 h1 ,有些人可能会选择转到下一个 h1 DOM订单。

For example, some screenreader might give you the ability to use some shortcut to go the the next h1 heading using some shortcut, and you can't suppose that the implementation would be the same in every screen reader. Some might chose to go the next h1 inside in the same section, some might chose to go to the next h1 in the DOM order.

这篇关于多个h1会导致屏幕阅读器出现问题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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