-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unnecessary label title #1826
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 |
@pksjce Do you think you could take a look or assign the right person? Thanks! |
LGTM. Thanks for raising this PR @PeterYangIO. @alliethu @mperrotti - Do you see any issues if we stop the |
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 therequired
attribute.Screenshots
No visual changes (unless you count the lack of a title when hovering as one).
Merge checklist