question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

new audit: hierarchy of headings

See original GitHub issue

Feature request summary

According to https://www.w3.org/WAI/tutorials/page-structure/headings/#heading-ranks “Skipping heading ranks can be confusing and should be avoided where possible: Make sure that a <h2> is not followed directly by an <h4>, for example.”

So, we might want to evaluate this structure on a page.

With additional support by core lighthouse developers I would love to spent time working on this new audit.

What is the motivation or use case for changing this?

How is this beneficial to Lighthouse? Another helpful audit under Accessibility or SEO

Have a nice week midzer

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
patrickhulcecommented, Oct 7, 2019

Thanks very much for filing @midzer! I think https://github.com/GoogleChrome/lighthouse/issues/7208#issuecomment-470996275 might cover this situation you describe. If so, let’s close this in favor of that. If not, maybe explain a bit how it’s different? 😃

0reactions
robdodsoncommented, Oct 10, 2019

Does going from an h1 to h3 really throw off the understanding of the page? I feel like I’ve done this intentionally when the content I’m sticking into a heading isn’t really a direct subchild of the h1 and it is really a lower grandchildlike concern, but maybe that’s really bad practice?

I think technically you’re not supposed to do that. There should be an h2 between that h1 and h3. In theory the flow would be like:

h1
  h2
    h3
    h3
      h4
  h2
    h3
  h2

If the audit is only checking that you aren’t skipping heading levels then it seems like it should be renamed… @WilcoFiers any thoughts on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Broken Headings Hierarchy [How To Fix] - YouTube
https://sitechecker.pro - Check where the headings hierarchy is broken with ease. This issue appears on those pages where higher heading ...
Read more >
The Comprehensive Table of Contents Headings and ...
The Comprehensive Table of Contents Headings and Hierarchy ... Added two new attributes for 1.15.2.1 (Summary of Changes in.
Read more >
Heading levels should only increase by one | Axe Rules
They should be brief, clear, unique, and marked with h1 through h6 elements applied in hierarchical order. All of these qualities make headings...
Read more >
How-to: Accessible heading structure - The A11Y Project
What does hierarchical mean? Hierarchical means arranged in order from most important to least important. The h1 is the most important heading ......
Read more >
Google Explains How to Use Headings for SEO
Clearly, heading tags can indicate hierarchical levels of information, that several H3 headers are sub-topics of the previous H2.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found