-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
AccessibilityThis issue is related to accessibility (a11y)This issue is related to accessibility (a11y)P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgenthelp wantedThe team would appreciate a PR from the community to address this issueThe team would appreciate a PR from the community to address this issue
Description
Bug, feature request, or proposal:
Proposal
What is the expected behavior?
When a mat-form-field
has an input that is required and disabled, It should not append the asterisk to the label. This is useful when the enabled status is controlled by some other form state, It doesn't make sense to display an input as required (with a *) while it is disabled.
What is the current behavior?
The mat-form-field
component always show the asterisk even when the form control is disabled.
What are the steps to reproduce?
https://stackblitz.com/edit/angular-material2-issue-uthrg2?file=app%2Fapp.component.html
What is the use-case or motivation for changing an existing behavior?
When control enable status is dynamic, the asterisk should be only shown when they are required and enabled, doing it manually requires doing always the enable state change and the required changed at the same time.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Material 2.0.0-beta.12
Is there anything else we should know?
Metadata
Metadata
Assignees
Labels
AccessibilityThis issue is related to accessibility (a11y)This issue is related to accessibility (a11y)P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgenthelp wantedThe team would appreciate a PR from the community to address this issueThe team would appreciate a PR from the community to address this issue