File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 99 [ngTemplateOutlet] ="iconOverrides[state] "
1010 [ngTemplateOutletContext] ="_getIconContext() "> </ ng-container >
1111 < ng-container *ngSwitchDefault [ngSwitch] ="state ">
12- < span *ngSwitchCase ="'number' "> {{_getDefaultTextForState(state)}}</ span >
12+ < span aria-hidden =" true " *ngSwitchCase ="'number' "> {{_getDefaultTextForState(state)}}</ span >
1313 < span class ="cdk-visually-hidden " *ngIf ="state === 'done' "> {{_intl.completedLabel}}</ span >
1414 < 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 >
1616 </ ng-container >
1717 </ div >
1818</ div >
Original file line number Diff line number Diff line change @@ -444,6 +444,11 @@ describe('MatStepper', () => {
444444 stepHeaderNativeElements . every ( element => element . querySelector ( '.mat-focus-indicator' ) ) ,
445445 ) . toBe ( true ) ;
446446 } ) ;
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+ } ) ;
447452 } ) ;
448453
449454 describe ( 'basic stepper when attempting to set the selected step too early' , ( ) => {
You can’t perform that action at this time.
0 commit comments