WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Hidden headings with aria-labelledby or just aria-label best for for labelling landmark regions?

for

From: glen walker
Date: Jul 23, 2018 8:59AM


Hi Steve. What in particular about using aria-label on a <nav> is bad on
farmers.gov?

I could see some overkill on their site, but it still works. They have a
<nav> inside a <nav> (for the main navigation), which isn't recommended but
is not illegal from an html spec perspective. They also use the word
"navigation" in their labels for their <nav> elements so you'll hear the
word "navigation" twice, once for the label and once because it's the type
of landmark.

I consider both of these issues a developer problem and not a problem with
using a label on a <nav>.

Ignoring <nav> at the moment, I've had headings in landmarks before and
used them as the aria-labelledby of the landmark but only because it was
natural to have a (visible) heading in the landmark. I have not added
visually hidden headings for the sole purpose of being the label for the
landmark. I don't see the purpose of that. Just use an aria-label
instead. If the heading isn't really the label for a section (and I use
the word "section" generically, not as a landmark element), then you
shouldn't have a heading. It would add confusion to the page outline.

On Mon, Jul 23, 2018 at 8:08 AM, Meacham, Steve - FSA, Kansas City, MO <
<EMAIL REMOVED> > wrote:

> I've found that putting aria-label on a <nav> element can also be
> problematic. See farmers.gov for an example.
>
>