ember-template-lint
ember-template-lint copied to clipboard
Incorrect no-redundant-role warning on input
In this example:
https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-autocomplete-both/
An <input>
has role="combobox"
.
ember-template-lint warns against doing this, but it seems like a valid thing to do.
QUESTION:
Does it make sense to allow the following:
<input role="combobox" />
Or should we only allow combobox
role in case ARIA attributes are also present? It seems like some attributes like aria-expanded
are a MUST https://w3c.github.io/aria/#combobox
QUESTION:
Does it make sense to allow the following:
<input role="combobox" />
Or should we only allow
combobox
role in case ARIA attributes are also present? It seems like some attributes likearia-expanded
are a MUST https://w3c.github.io/aria/#combobox
These types of heuristics are better served under a different rule. In this particular case, the rule is only concerned about flagging redundant roles as outline in the corresponding doc: https://github.com/ember-template-lint/ember-template-lint/blob/master/docs/rule/no-redundant-role.md.
Given that, role="combobox"
being identified as an error on an input
is definitely a bug, as technically, the two are not the same. FWIW, a combobox is more synonymous with the select
element.