material-components / material-components-web-react

Material Components for React (MDC React)
MIT License
2.02k stars 227 forks source link

[@material/react-switch] tabIndex prop is not propagated to inner <input> #1016

Open PsiRadish opened 4 years ago

PsiRadish commented 4 years ago

When setting tabIndex on a Switch, in the final rendered DOM the tabindex attribute ends up being placed on the outer-most div.mdc-switch, instead of the inner input element it needs to be on to have any effect. This makes it kind of impossible (without getting hacky) to set the tab order for a Switch.