Should I use HTML5 sectionning (aka Document Outline Algorithm) and use several h1
per page/document?
There are no implementations of the proposed outline algorithm in web browsers nor assistive technology; it was never part of a final W3C specification. Therefore the outline algorithm should not be used to convey document structure to users. Authors are advised to use heading rank (h1-h6) to convey document structure.
While using multiple
<h1>
elements on one page is allowed by the HTML standard (as long as they are not nested), this is not considered a best practice. A page should generally have a single<h1>
element that describes the content of the page (similar to the document's<title>
element).
Nesting multiple
<h1>
elements in nested sectioning elements was allowed in older versions of the HTML standard. However, this was never considered a best practice and is now non-conforming. Read more in There Is No Document Outline Algorithm.
If a document has one or more headings, at least a single heading within the outline should have a heading level of 1.
Each heading following another heading lead in the outline must have a heading level that is less than, equal to, or 1 greater than lead's heading level.
replace current outline algorithm with one based on heading levels
-
https://adrianroselli.com/2016/08/there-is-no-document-outline-algorithm.html
-
https://www.smashingmagazine.com/2020/01/html5-article-section
-
http://html5doctor.com/computer-says-no-to-html5-document-outline
-
https://codepen.io/stevef/post/a-decade-of-heading-backwards
Consider adding a headinglevelstart attribute #5033
-
https://twitter.com/goetsu/status/1261253532315004930
<p role=‘heading’ aria-level=‘1’>
?