@@ -132,28 +132,28 @@ describe('MatStepper', () => {
132
132
expect ( stepperComponent . selected instanceof MatStep ) . toBe ( true ) ;
133
133
} ) ;
134
134
135
- it ( 'should set the "tablist " role on stepper' , ( ) => {
135
+ it ( 'should set the "region " role on the vertical stepper' , ( ) => {
136
136
const stepperEl = fixture . debugElement . query ( By . css ( 'mat-stepper' ) ) ! . nativeElement ;
137
- expect ( stepperEl . getAttribute ( 'role' ) ) . toBe ( 'tablist ' ) ;
137
+ expect ( stepperEl . getAttribute ( 'role' ) ) . toBe ( 'region ' ) ;
138
138
} ) ;
139
139
140
140
it ( 'should display the correct label' , ( ) => {
141
141
const stepperComponent = fixture . debugElement . query (
142
142
By . directive ( MatStepper ) ,
143
143
) ! . componentInstance ;
144
- let selectedLabel = fixture . nativeElement . querySelector ( '[aria-selected ="true"]' ) ;
144
+ let selectedLabel = fixture . nativeElement . querySelector ( '[aria-expanded ="true"]' ) ;
145
145
expect ( selectedLabel . textContent ) . toMatch ( 'Step 1' ) ;
146
146
147
147
stepperComponent . selectedIndex = 2 ;
148
148
fixture . detectChanges ( ) ;
149
149
150
- selectedLabel = fixture . nativeElement . querySelector ( '[aria-selected ="true"]' ) ;
150
+ selectedLabel = fixture . nativeElement . querySelector ( '[aria-expanded ="true"]' ) ;
151
151
expect ( selectedLabel . textContent ) . toMatch ( 'Step 3' ) ;
152
152
153
153
fixture . componentInstance . inputLabel . set ( 'New Label' ) ;
154
154
fixture . detectChanges ( ) ;
155
155
156
- selectedLabel = fixture . nativeElement . querySelector ( '[aria-selected ="true"]' ) ;
156
+ selectedLabel = fixture . nativeElement . querySelector ( '[aria-expanded ="true"]' ) ;
157
157
expect ( selectedLabel . textContent ) . toMatch ( 'New Label' ) ;
158
158
} ) ;
159
159
0 commit comments