Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 986 Bytes

no-redundant-landmark-role.md

File metadata and controls

45 lines (32 loc) · 986 Bytes

no-redundant-landmark-role

If a landmark element is used, any role provided will either be redundant or incorrect. This rule adds support for landmark elements, to ensure that no role attribute is placed on any of the landmark elements, with a few exceptions.

Examples

This rule forbids the following:

<header role="banner"></header>
<main role="main"></main>
<aside role="complementary"></aside>
<nav role="navigation"></nav>
<form role="form"></form>

This rule allows the following:

<form role="search"></form>
<footer role="contentinfo"></footer>

References