When writing Markdown on Stack Overflow, you can create HTML section headings, also known as <h1>
or <hx>
, using '#' 1–6 times. This is very useful for questions and answers because you can create different visual heading levels that make it easier to read and understand a question or answer. However, creating headings that skip levels or unnecessarily reset the levels is an accessibility concern as per W3C's accessibility tutorial on headings.
I'm an h1
I'm an h3
I'm an h2
Alongside this, it would appear that there are no semantic elements being used for the individual questions and answers. One would expect an <article>
element to be used for these and as such, they should be easily identifiable with a header. This would mean that requiring a top heading on new answers, much like the way that questions require titles, would be beneficial as well.
All in all, it looks like there are some accessibility improvements that could possibly be made within Stack Overflow.
<h4>
through<h6>
headings sometime prior to 2021-07-11 (see my revision 13 here). I haven't gone back through looking for comments where I stated that h4 through h6 aren't possible. I appreciate you pointing out the erroneous comment.