Page 1 of 1

<main> or <main role="main">

Posted: Wed Mar 30, 2016 2:41 am
by Walter Metzger
Visitors of the forum,

I use for http://www.vfk-es.de/
<main role="main">
validate with F6 I receive no message

when I use
<main>
I receive with F 6
The "main" element should contain the role="main" attribute for user agents that don't (yet) implement the required role mapping. This improves accessibility.

When I investigate my homepage whith
https://validator.w3.org/ - using <main role="main">
I receive
Warning: Element main does not need a role attribute

Do I have use <main> or <main role="main"> ?

Greetings
from Germany in Spring-time
Walter Metzger

Re: <main> or <main role="main">

Posted: Wed Mar 30, 2016 6:19 am
by Albert Wiersch
Hi Walter,

In most cases (with modern browsers) role="main" is unnecessary and even undesirable. However, for old user agents it might still be helpful. At this point in time I think the "main" element has been around long enough (and most people are using browsers that make it unnecessary) that I'm going to remove the message about using role="main" in the next update.

Thanks for bringing this to my attention.