WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Can H2s be stacked?

for

From: Patrick H. Lauke
Date: Jan 29, 2024 8:34AM


On 29/01/2024 14:57, Piscitelli, JoAnn wrote:
> Hello everyone,
>
> I’m writing to check/confirm that it is ok to stack H2 headers. I am interested in your feedback and clarifications!
>
> The section of content is this:
>
> <h2>Explore Shopping</h2>
> <h2>Shops on Main Street</h2>
> <p>content</p>
> <h2>Farmers Markets</h2>
> <p>content</p>
> <h2>Other Shops</h2>
> <p>content</p>
>
> I believe this structure is ok, but I would feel better about it if I had confirmation.

From your structure, "Explore Shopping", "Shops on Main Street" etc are
all siblings. I assume though that "Explore Shopping" is meant to
encompass all the other ones, so no, doesn't look appropriate. "Shops.."
etc look like they should be <h3>s to hierarchically come under the
first <h2>Explore Shopping</h2>.


--
Patrick H. Lauke

* https://www.splintered.co.uk/
* https://github.com/patrickhlauke
* https://flickr.com/photos/redux/
* https://mastodon.social/@patrick_h_lauke