Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
657 views
in Technique[技术] by (71.8m points)

html - Do multiple h1's cause screen readers problems?

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.

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...