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
{{ message }}
This repository was archived by the owner on May 16, 2023. It is now read-only.
a11y compliance for inputs requires that all inputs have a <label> with a for attribute that points to the ID of the <input> element or that the <input> element has an aria-label or aria-labelledby attribute.
The goal of this PR is to introduce the options for those attributes on the input. To be more specific:
To allow an id attribute on the <input> if one is passed in through an inputId prop on a <Switch> component.
To allow an aria-label attribute on the <input> if one is passed in through an inputAria.label prop on a <Switch> component.
To allow an aria-labelledby attribute on the <input> if one is passed in through an inputAria.labelledby prop on a <Switch> component.
I believe the best way to achieve this is to call the prop for the input id inputId just to be more specific than simply id in order to communicate that this prop will specifically be used to set the id attribute of the <input>. Similarly, I believe that nesting the ARIA-specific properties for the input in an object inputAria for those same reasons is also the best choice of action in this case.