Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it OK to skip heading levels

Tags:

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?

like image 836
Aaron Avatar asked Jan 08 '12 15:01

Aaron


People also ask

Can I skip heading levels?

A document is structured using headings with different hierarchy levels, see “Structure with the help of multi-level headings”. To ensure that the structure made with headings can always be understood, the heading levels mustn't be skipped. This means <H1> mustn't be followed directly by <H3> .

Should heading tags skip levels?

Skipping heading levels should be avoided (e.g. H1 directly to H3) from an accessibility point of view. People using screen readers often rely on navigating by heading so if the structure isn't hierarchical they may not understand the relationship.

Is the most important level of headings?

A heading element implies all the font changes, paragraph breaks before and after, and any white space necessary to render the heading. The heading elements are H1, H2, H3, H4, H5, and H6 with H1 being the highest (or most important) level and H6 the least.


2 Answers

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.

like image 135
stringy Avatar answered Sep 19 '22 04:09

stringy


From WCAG 2: G141: Organizing a page using headings:

To facilitate navigation and understanding of overall document structure, authors should use headings that are properly nested (e.g., h1 followed by h2, h2 followed by h2 or h3, h3 followed by h3 or h4, etc.).

like image 24
Quentin Avatar answered Sep 21 '22 04:09

Quentin