-
Notifications
You must be signed in to change notification settings - Fork 827
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
Text field required asterisk should be optional #5256
Comments
We'll check in with design to see what the intended behavior is. The second link provided to the spec indicates that the required asterisk must be present on required fields.
The first link provided to the error text video demonstrates the asterisk disappearing, but that may be an incorrect video asset. The spec text does not explicitly say that the asterisk is optional. |
This line implies that if most or all fields are required then it would be better to highlight the optional ones instead of highlighting required fields - at least that is my understanding. I agree, it could be a mistake in the video asset. It looks strange to have it there without the *required supporting-text however, like when it changes to an error message. but then equally odd if you have the *required supporting-text and no asterisk in the label when it is filled out. |
Thanks for investigating this! I confirmed with design that the required asterisk I think @property({type: Boolean, attribute: 'no-asterisk'}) noAsterisk = false; <md-outlined-text-field label="Name" required no-asterisk></md-outlined-text-field> |
This issue can be closed, as it is solved. |
What is affected?
Component
Description
According to the md3 docs the required asterisk on the label text should not be present once the field has a value:
https://m3.material.io/components/text-fields/guidelines#9ad90554-a793-4506-9075-6812fd7b381a
There should also be a way to choose if you want the asterisk to show at all, as per https://m3.material.io/components/text-fields/guidelines#6c36a812-273d-4f5d-9102-2f00386c9145 for when you want to highlight the optional fields and not required ones.- I couldn't see a way to do this in docs.
Reproduction
N/A
Workaround
N/A
Is this a regression?
No or unsure. This never worked, or I haven't tried before.
Affected versions
Nightly
Browser/OS/Node environment
Edge Version 119.0.2151.97 (Official build) (64-bit)
The text was updated successfully, but these errors were encountered: