Seems like enforcing "role", where an expressive semantic element already makes it clear, is considered a kind of tautology, eg. role="navigation" in <nav>
It's an info warning, not an error, but may be an opportunity for you to cut some wordage if you wanted, as long as you left in-place any roles in non-corresponding elements.
Personally, maybe I get off on seeing role="" and being forced to think about it, but I guess W3C is saying I don't need to.
Is there any backward-compatibility reason to leave them in situ?
These are the reported warnings I see for a single post page...
W3C Validator issues many Info warnings like: "The 'banner' role is unnecessary for element 'header'"... but also for others beside 'banner'.
https://stackoverflow.com/questions/48814890/are-role-attributes-necessary-in-html5
Seems like enforcing "role", where an expressive semantic element already makes it clear, is considered a kind of tautology, eg.
role="navigation"
in<nav>
It's an info warning, not an error, but may be an opportunity for you to cut some wordage if you wanted, as long as you left in-place any roles in non-corresponding elements.
Personally, maybe I get off on seeing
role=""
and being forced to think about it, but I guess W3C is saying I don't need to.Is there any backward-compatibility reason to leave them in situ?
These are the reported warnings I see for a single post page...