← Back

Sectioning elements

Sectioning elements have always been part of HTML, the body element is one of them.

But HTML5 added many more:

Announcing landmarks

Landmarks are great, they are the secondary way how screen-reader users navigate behind headings.

Because of that it is important to make them easily accessible.

Imagine on your page, you have an aside. A user navigating by landmarks will only hear "aside" when they navgitate to it which doesn't give them very much information.

It is likely that this aside has a title (or at least a sr-only title). That's how a user navigating by heading would have found it.

Since it has a title, you can give more information to the user navigating by landmarks by using the aria-labelledby attribute like so:

<aside aria-labelledby="aside-title">
	<h3 id="aside-title">Other news</h3>
	[...]
</aside>

That way, a user navigating by landmarks will here "Aside, Other news". This gives them much more information than just "Aside".

This logic is especially important for the section tag. Screen readers will simply ignore it from the landmarks (like a div) If you don't have aria-labelledby.

Article

article is supposed to represent a unit of content that can live on its own taken out of context.

It was created to facilitate syndication on the web. It was meant to be used to represent comments in a rss feed, blog posts, forum posts, product card etc.

The problem with that is that not all screen readers handle article the same.

Some will ignore article outright others will warn the user they are entering an article.

Now this second case can be problematic, because remember, article can be used for stuff like product lists. Product lists are often also wrapped insde a ul (as they should).

This means that some screen reader users are read the page something like that:

You get the point, that's really really verbose.

So in reality, article should only be used for actual articles. Blog posts, Journal entries etc.

Nav

nav is a pretty self explanatory tag.

One thing to watch out for is to avoid redundancy in the title. Often we will see navigations having a screen-reader only title like "Main navigation" or "Footer navigation".

But doing this means that your users will hear "Navigation, Main navigation". The navigation is repeated twice which can create cognitive fatigue.

The better approcach is to find a descriptive title for the navigation like "Pages menu" or "Product categories". That way, both users navigating by headings or by landmark get relevant information.

Header and footer

Headers and footers can be used everywhere throughout your pages. It's common to put a header in a product card for example to isolate the title and the product image from the product informations.

But for screen-reader users, only the header and footer found as direct children of body get announced.