You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a <input type="number"/> in the HTML, the implicit role of it is spinbutton. This happens both in Chrome 81 (image) and Firefox 76.
So it can be concluded that in <input type="number" role="textbox" /> the role attribute is not redundant, since it modifies the implicit role of the HTML. However the rule no-redundant-roles does not consider this.
The text was updated successfully, but these errors were encountered:
@andre-matulionis-ifood it's worse than that. The semantics change to textbox in the AX Tree, but the UX in the browser remains a spinbutton. I think you discovered a new category of how to abuse HTML input semantics :) There will be some cases that are OK, like upgrading a textbox to a combobox, but cases like the one you point out where the semantics and UX are incompatible.
Let's make this a new rule issue instead of a bug.
Sandbox reproducing: https://codesandbox.io/s/jsx-a11y-no-redundant-role-p6ojt?file=/src/App.js
For a
<input type="number"/>
in the HTML, the implicit role of it isspinbutton
. This happens both in Chrome 81 (image) and Firefox 76.So it can be concluded that in
<input type="number" role="textbox" />
therole
attribute is not redundant, since it modifies the implicit role of the HTML. However the ruleno-redundant-roles
does not consider this.The text was updated successfully, but these errors were encountered: