WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: The importance of landmarks to screen readers?

for

From: Bart Simons
Date: Mar 24, 2021 5:19AM


> you should also specify an aria-label for the landmark.

I would like to add some nuances to this statement.
Taking the website http://www.keat.gr/index.php/en/ as an example.

When using a role="search" there is really no need to label that section
with the word search that you labelledby from a visually hidden heading:
<section role="search" aria-labelledby="zf--search--section-heading">
<h2 id="zf--search--section-heading" class="zf--section-heading
visually-hidden">Search</h2>

We also don't need a section labelled "footer" inside the <footer> element:
<footer role="contentinfo">
<section aria-labelledby="zf--footer-content--section-heading"
<h2 id="zf--footer-content--section-heading"
class="visually-hidden">Footer</h2>

Further I'd limit the number of occurences of the same landmark on a
page rather than trying to find descriptive labels. They clearly ran out
of inspiration when they came up with
"complementary content (lower)"

It is not trivial to label a set of nav sections in a useful way. My
plea is to limit the number of landmarks avoiding the necessity to label
them.

Regards

Bart Simons


Op 23/03/2021 om 21:32 schreef glen walker:

> You often find scanning tools that flag a lack of landmarks as an error.
> Or more frequently, they're marked as a "best practice" but many people
> miss the "best practice" part and think *all* errors found by the tool are
> required to be fixed.
>
> Nothing in WCAG requires landmarks directly. They can absolutely be
> helpful for navigating the page (with assistive technology) and aiding in
> 2.4.1 conformance. They can also be helpful in satisfying 1.3.1 since you
> can often visually discern a "relationship" among elements that should be
> programmatically conveyed. But it can be a bit subjective on whether
> landmarks are really "required".
>
> But does it matter if they are technically needed or not? From a UX
> perspective, they're super handy so go ahead and implement them. If
> browsers would implement a native way to navigate by landmarks then more
> users could benefit from them, especially keyboard users.
>
> And if you are going to implement them, lean towards using native semantic
> html elements first before relying on ARIA roles. Use <header>, <footer>,
> <main>, <nav>, <section>, <aside>, etc. And other than <header>, <footer>,
> or <main>, you should also specify an aria-label for the landmark.
> > > >