File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -88,13 +88,20 @@ for detecting when an input becomes autofilled and changing the appearance of th
88
88
89
89
The ` matInput ` directive works with native ` <input> ` to provide an accessible experience.
90
90
91
+ #### Aria attributes
92
+
91
93
If the containing ` <mat-form-field> ` has a label it will automatically be used as the ` aria-label `
92
94
for the ` <input> ` . However, if there's no label specified in the form field, ` aria-label ` ,
93
95
` aria-labelledby ` or ` <label for=...> ` should be added.
94
96
97
+ #### Errors and hints
98
+
95
99
Any ` mat-error ` and ` mat-hint ` are automatically added to the input's ` aria-describedby ` list, and
96
100
` aria-invalid ` is automatically updated based on the input's validity state.
97
101
102
+ When conveying an error, be sure to not rely soley on color. In the message itself, you can use an
103
+ icon or text such as "Error:" to indicate the message is an error message.
104
+
98
105
### Troubleshooting
99
106
100
107
#### Error: Input type "..." isn't supported by matInput
You can’t perform that action at this time.
0 commit comments