W3C Validation Errors: "The navigation role is unnecessary for element nav.
<nav role="navigation">
I'm having hgroup nightmare flashbacks.
BTW, I still use hgroup - but as a CSS Class (.hgroup).
Webmasters Stack Exchange is a question and answer site for pro webmasters. It only takes a minute to sign up.
Sign up to join this communityW3C Validation Errors: "The navigation role is unnecessary for element nav.
<nav role="navigation">
I'm having hgroup nightmare flashbacks.
BTW, I still use hgroup - but as a CSS Class (.hgroup).
A few things to note: Use of ARIA attributes is not deprecated in HTML, but use on native elements which have built in roles/states and properties is discouraged now as their use in general serves no purpose.
In the case cited they are warnings not errors. It is an error if a MUST requirement is not adhered to. It is a warning if a SHOULD requirement is not adhered to. In the case of SHOULD, there may well be some good reason; such as in this particular instance, the built in role of an element is not exposed by an older browser.
The rules for use of ARIA in HTML, which the W3C validator implements are defined in ARIA in HTML specification, the rules defined in the WHATWG spec are way out of date and not maintained. You can read more about the reasoning for the warnings in On HTML belts and ARIA braces and general info about W3C HTML conformance checkers in HTML5 – Check it Before you Wreck it with Mike[tm] Smith
No, ARIA Role attributes have not been deprecated in HTML5; The element name/role name redundancy is to provide a fallback for user agents that do not support ARIA role attributes. The fallback (graceful degradation) "fills the gaps in support for HTML5 semantics as ARIA is more robustly supported by most modern browsers and assistive technology"
<nav role=”navigation”>
HTML5 Accessibility Chops: When to use an ARIA role
You can read more here:
http://www.w3.org/TR/wai-aria/host_languages#host_general_conflict_header
https://html.spec.whatwg.org/multipage/dom.html#wai-aria
http://www.w3.org/WAI/PF/aria-practices/
<nav>
element would be considered unnecessary because the element itself tells search engines the 'role' by just the element name. The same could be seen usingrole="content"
on a<main>
element, again the element tells the role without having to express further. I'd imagine this is the case but I'm not the best person to ask regarding W3C standards and the is a lot of better members to answer this question, hopefully someone can confirm my logic :_)