File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 9
9
[ngTemplateOutlet] ="iconOverrides[state] "
10
10
[ngTemplateOutletContext] ="_getIconContext() "> </ ng-container >
11
11
< ng-container *ngSwitchDefault [ngSwitch] ="state ">
12
- < span *ngSwitchCase ="'number' "> {{_getDefaultTextForState(state)}}</ span >
12
+ < span aria-hidden =" true " *ngSwitchCase ="'number' "> {{_getDefaultTextForState(state)}}</ span >
13
13
< span class ="cdk-visually-hidden " *ngIf ="state === 'done' "> {{_intl.completedLabel}}</ span >
14
14
< span class ="cdk-visually-hidden " *ngIf ="state === 'edit' "> {{_intl.editableLabel}}</ span >
15
- < mat-icon *ngSwitchDefault > {{_getDefaultTextForState(state)}}</ mat-icon >
15
+ < mat-icon aria-hidden =" true " *ngSwitchDefault > {{_getDefaultTextForState(state)}}</ mat-icon >
16
16
</ ng-container >
17
17
</ div >
18
18
</ div >
Original file line number Diff line number Diff line change @@ -444,6 +444,11 @@ describe('MatStepper', () => {
444
444
stepHeaderNativeElements . every ( element => element . querySelector ( '.mat-focus-indicator' ) ) ,
445
445
) . toBe ( true ) ;
446
446
} ) ;
447
+
448
+ it ( 'should hide the header icons from assistive technology' , ( ) => {
449
+ const icon = fixture . nativeElement . querySelector ( '.mat-step-icon span' ) ;
450
+ expect ( icon . getAttribute ( 'aria-hidden' ) ) . toBe ( 'true' ) ;
451
+ } ) ;
447
452
} ) ;
448
453
449
454
describe ( 'basic stepper when attempting to set the selected step too early' , ( ) => {
You can’t perform that action at this time.
0 commit comments