💼 This rule is enabled in the 📋 template-lint-migration config.
🔧 This rule is automatically fixable by the --fix CLI option.
The rule checks for redundancy between any semantic HTML element with a default/implicit ARIA role and the role provided.
For example, if a landmark element is used, any role provided will either be redundant or incorrect. This rule ensures that no role attribute is placed on any of the landmark elements, with the following exceptions:
- a
navelement with thenavigationrole to make the structure of the page more accessible to user agents - a
formelement with thesearchrole to identify the form's search functionality - a
inputelement withcomboboxrole to identify the input as a combobox
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, instead of just landmark roles (default:true)
- boolean --