-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[TextField] Should always have an aria-labelledby property #2401
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
Conversation
cb717e4
to
52035f0
Compare
🎩 works great! Just thinking we should probably add a test for this. Coverage is fine but this is not covered. What do you think? |
Probably best to add a test so that this fix doesn't get accidentally changed in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 but probably can add a changelog for this?
4635538
to
391e936
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Part of #795
WHY are these changes introduced?
If the text field does not have a
prefix
orsuffix
, then it doesn't have anaria-labelledby
value. Sincelabel
is a required prop on TextField, we will always have an id to link to.WHAT is this pull request doing?
Removing the check for an empty array since the labelledby property should have a value regardless if the
TextField
has a prefix or suffix.How to 🎩
aria-labelledby
matching the label element.PolarisTextField2Label
on the input.🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
🎩 checklist
README.md
with documentation changes