WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Landmark and HTML 5

for

From: glen walker
Date: Mar 9, 2020 4:54PM


One other comment from a spec perspective. If you look at the spec for the
<main> element or <nav> or other landmarks it specifically says:

https://www.w3.org/TR/html53/grouping-content.html#the-main-element
Allowed ARIA role attribute values: main role (default - do not set).

And then there's a definition of "do not set" at
https://www.w3.org/TR/html53/dom.html#do-not-set

But as others have said, it doesn't hurt to set it, assuming you're setting
it to a valid value, but I tend to keep my code as simple as possible and
not set things that aren't needed.