Uh oh!
There was an error while loading. Please reload this page.
Remove unnecessary label title - #1826
Conversation
🦋 Changeset detectedLatest commit: 1daaa0e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
PeterYangIO
commented
Jan 29, 2022
PeterYangIO
commented
Feb 9, 2022
@pksjce Do you think you could take a look or assign the right person? Thanks! |
rezrah
commented
Feb 9, 2022
LGTM. Thanks for raising this PR @PeterYangIO. @alliethu@mperrotti - Do you see any issues if we stop the |
PeterYangIO
commented
Feb 14, 2022
Hi @rezrah I do not have merge permissions for the repo, if you think it looks good do you think you could merge it? Thanks! |



Remove unnecessary title attribute on
<InputLabel/>. Currently there is a title that says "required field" when the input is marked as required which can end up overriding the accessible name for the input. The first screenshot shows how the a11y labels are parsed when trying to usegetByRole('textbox', {name: TEXTINPUTFIELD_LABEL_TEXT}). As you can see, the title overrides the label text which will be particularly confusing on a page with multiple required inputs as the a11y tree will show multiple text inputs all with the "required field" name.In this PR I simply remove the title attribute because the necessary "required" information is already passed to the
<input/>itself with therequiredattribute.Screenshots
No visual changes (unless you count the lack of a title when hovering as one).
Merge checklist