✅ The extends: 'recommended'
property in a configuration file enables this rule.
🔧 The --fix
option on the command line can automatically fix some of the problems reported by this rule.
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 the following exceptions:
- a
nav
element with thenavigation
role to make the structure of the page more accessible to user agentss - a
form
element with thesearch
role to identify the form's search functionality
This rule forbids the following:
This rule allows the following:
-
boolean -- if
true
, default configuration is applied -
object -- containing the following property:
- boolean --
checkAllHTMLElements
-- iftrue
, the rule checks for redundancy between any semantic HTML element with a default/implicit ARIA role and the role provided (default:false
) (TODO: enable by default in next major release)
- boolean --