Bootstrap HTML Validator Warning: The nav element does not need a role attribute

I am inserting a menu into my index:

<nav id="mainmenu" class="navbar navbar-default" role="navigation"> 

But when I try to check it (in local), validator.w3 tell me:

A warning. The nav element does not need a role attribute.

I can not find a solution, can someone help me?

+7
html validation twitter-bootstrap navigation
source share
1 answer

Delete role="navigation" .

The <nav> element already has navigation semantics for navigation. You do not need to add them with the role attribute. Saying "This navigation item to navigate" is redundant and stupid.

 <nav id="mainmenu" class="navbar navbar-default"> 
+9
source share

All Articles