Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have insert a menu in my index:

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

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

Warning: Element nav does not need a role attribute.

I can't find a solution, can someone help me?

like image 511
RBNZ Avatar asked Aug 05 '15 11:08

RBNZ


1 Answers

Delete role="navigation".

The <nav> element already has the semantics of being for navigation. You don't need to add them with the role attribute. Saying "This navigation element is for navigation" is redundant and silly.

<nav id="mainmenu" class="navbar navbar-default">
like image 105
Quentin Avatar answered Oct 09 '22 00:10

Quentin