react-toolbox / react-toolbox

A set of React components implementing Google's Material Design specification with the power of CSS Modules
http://www.react-toolbox.io
MIT License
8.66k stars 969 forks source link

Input component causing accessibility violation #1887

Open codycaldwell opened 5 years ago

codycaldwell commented 5 years ago

The Input component defines an input tag along with a role attribute equal to 'input'. This causes some accessibility scanners to raise the following violation:

"The WAI-ARIA role(s) and/or attribute(s) input are not valid for the element input"

Is there a way we can remove the redundant role or at least provide a way to override the value?

theajr commented 4 years ago

@rubenmoya

As per MDN, we don't need to have role for semantic elements i.e. input and textarea etc.

role should be textbox instead of input

Semantic elements are more concise and require no JavaScript to support textbox features.