We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 484a96c commit 2a086ceCopy full SHA for 2a086ce
src/material-examples/form-field-prefix-suffix/form-field-prefix-suffix-example.html
@@ -1,7 +1,9 @@
1
<div class="example-container">
2
<mat-form-field>
3
<input matInput placeholder="Enter your password" [type]="hide ? 'password' : 'text'">
4
- <mat-icon matSuffix (click)="hide = !hide">{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>
+ <button mat-icon-button matSuffix (click)="hide = !hide" [attr.aria-label]="'Hide password'" [attr.aria-pressed]="hide">
5
+ <mat-icon>{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>
6
+ </button>
7
</mat-form-field>
8
9
0 commit comments