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

Post here if your topic is about CSS HTML Validator but doesn't fit in another forum.
Post Reply
Walter Metzger
Rank II - Novice
Rank II - Novice
Posts: 48
Joined: Tue Feb 26, 2008 12:57 pm
Location: Germany
Contact:

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

Post by Walter Metzger » Wed Mar 30, 2016 2:41 am

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

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3250
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

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

Post by Albert Wiersch » Wed Mar 30, 2016 6:19 am

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.
Image
Albert Wiersch

Post Reply