@@ -114,11 +114,6 @@ describe('MatStepper', () => {
114114 expect ( stepper . selected instanceof MatStep ) . toBe ( true ) ;
115115 } ) ;
116116
117- it ( 'should set the "tablist" role on stepper' , ( ) => {
118- const stepperEl = fixture . debugElement . query ( By . css ( 'mat-stepper' ) ) ! . nativeElement ;
119- expect ( stepperEl . getAttribute ( 'role' ) ) . toBe ( 'tablist' ) ;
120- } ) ;
121-
122117 it ( 'should display the correct label' , ( ) => {
123118 let selectedLabel = fixture . nativeElement . querySelector ( '[aria-selected="true"]' ) ;
124119 expect ( selectedLabel . textContent ) . toMatch ( 'Step 1' ) ;
@@ -344,7 +339,7 @@ describe('MatStepper', () => {
344339
345340 it ( 'should set the correct aria-posinset and aria-setsize' , ( ) => {
346341 const headers = Array . from < HTMLElement > (
347- fixture . nativeElement . querySelectorAll ( '.mat-step-header ' ) ,
342+ fixture . nativeElement . querySelectorAll ( '[role="tab"] ' ) ,
348343 ) ;
349344
350345 expect ( headers . map ( header => header . getAttribute ( 'aria-posinset' ) ) ) . toEqual ( [ '1' , '2' , '3' ] ) ;
@@ -941,7 +936,7 @@ describe('MatStepper', () => {
941936 const fixture = createComponent ( SimpleMatVerticalStepperApp ) ;
942937 fixture . detectChanges ( ) ;
943938
944- const stepperEl = fixture . debugElement . query ( By . css ( 'mat-stepper ' ) ) ! . nativeElement ;
939+ const stepperEl = fixture . debugElement . query ( By . css ( '[role="tablist"] ' ) ) ! . nativeElement ;
945940 expect ( stepperEl . getAttribute ( 'aria-orientation' ) ) . toBe ( 'vertical' ) ;
946941 } ) ;
947942
@@ -1045,7 +1040,7 @@ describe('MatStepper', () => {
10451040 const fixture = createComponent ( SimpleMatHorizontalStepperApp ) ;
10461041 fixture . detectChanges ( ) ;
10471042
1048- const stepperEl = fixture . debugElement . query ( By . css ( 'mat-stepper ' ) ) ! . nativeElement ;
1043+ const stepperEl = fixture . debugElement . query ( By . css ( '[role="tablist"] ' ) ) ! . nativeElement ;
10491044 expect ( stepperEl . getAttribute ( 'aria-orientation' ) ) . toBe ( 'horizontal' ) ;
10501045 } ) ;
10511046
0 commit comments