Closed (duplicate)
Project:
Drupal core
Version:
8.4.4
Component:
Stable theme
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Jan 2018 at 14:59 UTC
Updated:
25 Jan 2018 at 22:10 UTC
Jump to comment: Most recent
Comments
Comment #2
andrewmacpherson commentedThanks for reporting this @spencer95. This has been reported several times, so I'll close it as a duplicate of #2655794: Remove redundant WAI-ARIA role attributes from <main>, <nav>, <aside>, <header>, and <footer> elements.
For the time being, we need to keep the redundant
role="navigation"attribute. While the HTML5 and ARIA-in-HTML documents recommend not setting it, that's on the assumption that browsers will pass the implicit ARIA role semantic to OS-level accessibility APIs. Most up to date browsers do this correctly. From the ARIA-in-HTML working draft (13th Oct 2017):The problem is, IE11 doesn't do this. It only works if an explicit
role="navigation"is present. Without this, users of IE11 and NVDA screen reader will not be able to identify navigation landmark regions.It's fixed in MS Edge, but I don't expect it will ever be fixed in IE11. So we need to keep it around until Drupal core stops supporting IE11. It is valid HTML5 though, and the W3C validator reports it as a warning (not an error).
Further reading:
<nav>.Comment #3
andrewmacpherson commentedClarifying the title. It's not invalid HTML if role=navigation is present, it's just redundant. The W3C HTML validator produces a warning, not an error.