-
Notifications
You must be signed in to change notification settings - Fork 6.8k
refactor(material-experimental/mdc-form-field): align label setup with non-MDC version #24339
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
refactor(material-experimental/mdc-form-field): align label setup with non-MDC version #24339
Conversation
…h non-MDC version Aligns the floating label setup of the MDC-based form field with the non-MDC version for better accessibility and to allow for easier customization. Includes: * Moving the required asterisk into its own element. * Reducing the specificity of the label typography.
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.
Is there any specific reason to switch away from how MDC renders the asterisk? If so, would it make sense landing such a change upstream as well/instead?
I submitted the PR, because we had an internal report that the targeting the asterisk is difficult, because of some lint rules that don't allow users to target MDC classes. It's also a potential accessibility issue, because there's no way to set |
Yeah that makes sense. I read that some screen readers will read the rendered pseudo-element content. Although what I'm trying to check is whether it would make sense to land such change upstream first before we just diverge even more (the form-field obviously diverges a lot anyway from the basic MDC textfield) |
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.
LGTM overall, if we want to go with that before MDC adjusts its docs/whatever else is involved.
…h non-MDC version (#24339) Aligns the floating label setup of the MDC-based form field with the non-MDC version for better accessibility and to allow for easier customization. Includes: * Moving the required asterisk into its own element. * Reducing the specificity of the label typography. (cherry picked from commit 88029be)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Aligns the floating label setup of the MDC-based form field with the non-MDC version for better accessibility and to allow for easier customization. Includes: