WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: The importance of landmarks to screen readers?


From: glen walker
Date: Mar 29, 2021 9:51AM

I tried to avoid this because I'm kind of nit-picking things a bit but be
careful when you state something violates the spec.

The spec for the complementary landmark says "A supporting section of the
document, designed to be complementary to the main content at a similar
level in the DOM hierarchy, but remains meaningful when separated from the
main content." There's nothing in the wording that requires the developer
to do anything in particular. It hints at putting a complementary landmark
at the same level of the DOM as the main landmark but is certainly not
required, so *not* doing that is not a violation of anything.

If the spec requires a developer to do something, it will say "Authors
If the spec strongly encourages but not necessarily requires a developer to
do something, it will say "Authors SHOULD..."
In the case of complementary, it doesn't say either.

WCAG tells you how to find the definitions of MUST and SHOULD at
If you follow the footnotes, it'll eventually take you to
https://tools.ietf.org/html/rfc2119 where you'll see MUST means required
and SHOULD means recommended (or strongly encouraged).

Notice in the complementary spec that it says "User agents SHOULD treat
elements with the role of complementary as navigational landmarks."
That means browsers (user agents) are strongly encouraged to surface the
complementary role as a landmark, but there might be cases where it's not.

Take a look at the region role, https://www.w3.org/TR/wai-aria/#region.
Most of you probably know that a region landmark will be ignored by most
screen readers if the region doesn't have an accessible name. Did you know
that providing an accessible name is required? It's a MUST. "Authors MUST
give each element with role region a brief label that describes the purpose
of the content in the region." So if your region doesn't have an
accessible name, you are violating the spec. There are several SHOULDs for
region roles too.