WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: landmarks/regions


From: glen walker
Date: Oct 9, 2021 3:14PM

> What surprised me the most is that headers and footers were not
> automatically landmarks.

Just to clarify, the header and footer elements are absolutely (*) landmark
roles by default. Now, whether the verbosity setting on your screen reader
is set to announce them is another issue but any tool you use to highlight
all the landmarks will show the header and footer elements.

(*) Ok, maybe not "absolutely" because if a header or footer is a child of
an article, aside, main, nav or section element, then the header or footer
does not have a role (https://w3c.github.io/html-aria/#el-header). I don't
see that structure very often, though. Most scanning tools don't honor the
spec even though the accessibility tree is correct (at least in Chrome and
Firefox). That is, scanning tools will complain that there are two heading
landmarks if you have something like this:

<article><header>more stuff</header></article>

Even though the second header is marked as "role: HeaderAsNonLandmark" in
the a11y tree.

Keep preaching semantic html.