DEV Community

Getting Heading Levels Right - Including Here on DEV

Suzanne Aitchison on October 22, 2019

During Hacktoberfest I spent some time searching for and helping with small accessibility issues in open source projects. One issue I saw coming up...
Collapse
 
s_aitchison profile image
Suzanne Aitchison

There was a really great post on this recently that I recommend:

Also you might find this page useful on my website Up Your A11y: Accessible Page Layouts

Adding a lint tool like Axe or Wave to your usual development browser and checking in with it regularly will give you lots of great pointers too.

Hope this helps!

Collapse
 
s_aitchison profile image
Suzanne Aitchison

I should also say, regardless of which HTML element your header is in, you can and should always consider it in connection with all other headers on the page - in terms of heading hierarchy you consider the page as a whole. Again, it helps a screen reader user scan the content the same way a sighted user would.

Using those additional semantic elements give your page other accessibility boosts, so definitely keep using them too!

Collapse
 
rhymes profile image
rhymes

Great article Suzanne, maybe we should change the markdown parser of the article editor to be smarter and disallow h1s...

Collapse
 
s_aitchison profile image
Suzanne Aitchison

Maybe it would be good even just in the guidance/"Things to know" page if we included some pointers 🤔

Collapse
 
rhymes profile image
rhymes

The editor guide is a possible place to put this but I feel having an automatism would make sense also for people that don't read it, or if the article gets in from other avenues (like RSS feeds and the API).

Would you consider opening an issue about this?

Collapse
 
timrodz profile image
Juan Alejandro Morais

So much yes! What a great post, Suzanne - thanks for sharing your experiences!

 
s_aitchison profile image
Suzanne Aitchison

Yes sorry I realised that after I posted - woops! Hopefully my other reply makes sense 🙃