Début de fix pour avoir la navigation au clavier dans le

formulaire de login
This commit is contained in:
Sébastien André
2020-07-29 12:54:59 +02:00
parent 00a822df0d
commit a755d5f362
3 changed files with 26 additions and 19 deletions

View File

@@ -2,8 +2,8 @@
<p>
<mat-form-field>
<mat-label>Username</mat-label>
<input matInput formControlName="username" [ngClass]="{ 'is-invalid': submitted && formCtrls.username.errors }"
tabindex="0">
<input matInput #username="matInput" formControlName="username"
[ngClass]="{ 'is-invalid': submitted && formCtrls.username.errors }">
<mat-error *ngIf="formCtrls.username.hasError('required')">
Username is required
</mat-error>
@@ -16,7 +16,7 @@
<mat-form-field>
<mat-label>Password</mat-label>
<input type="password" matInput formControlName="password"
[ngClass]="{ 'is-invalid': submitted && formCtrls.password.errors }" tabindex="1">
[ngClass]="{ 'is-invalid': submitted && formCtrls.password.errors }">
<mat-error *ngIf="formCtrls.password.hasError('required')">
Password is required
</mat-error>