Add explicit step and aria-current attribute in register form
authorCaroline Chuong <caroline.chuong@octo.com>
Wed, 10 Jun 2020 15:21:45 +0000 (17:21 +0200)
committerRigel Kent <par@rigelk.eu>
Wed, 10 Jun 2020 15:38:00 +0000 (17:38 +0200)
client/src/app/+signup/+register/custom-stepper.component.html

index bf507fc4f59b27fbdc5b8985893232f9af193dec..57374d41e59e311eaf5c8da2b5b277004bca21bd 100644 (file)
@@ -2,11 +2,11 @@
   <header>
     <ng-container *ngFor="let step of steps; let i = index; let isLast = last;">
       <div
-        class="step-info" [ngClass]="{ active: selectedIndex === i, completed: isCompleted(step) }"
+        class="step-info" [ngClass]="{ active: selectedIndex === i, completed: isCompleted(step) }" [attr.aria-current]="selectedIndex === i"
         (click)="onClick(i)"
       >
         <div class="step-index">
-          <ng-container *ngIf="!isCompleted(step)">{{ i + 1 }}</ng-container>
+          <ng-container *ngIf="!isCompleted(step)"><span class="sr-only" i18n>Step</span> {{ i + 1 }}</ng-container>
           <my-global-icon *ngIf="isCompleted(step)" iconName="tick"></my-global-icon>
         </div>