File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -983,7 +983,10 @@ describe('MatChipGrid', () => {
983983 errorTestComponent . formControl . markAsTouched ( ) ;
984984 fixture . detectChanges ( ) ;
985985
986- expect ( containerEl . querySelector ( 'mat-error' ) ! . getAttribute ( 'aria-live' ) ) . toBe ( 'polite' ) ;
986+ expect (
987+ containerEl . querySelector ( '[aria-live]:has(mat-error)' ) ! . getAttribute ( 'aria-live' ) ,
988+ ) . toBe ( 'polite' ) ;
989+ } ) ;
987990 } ) ;
988991
989992 it ( 'sets the aria-describedby on the input to reference errors when in error state' , fakeAsync ( ( ) => {
Original file line number Diff line number Diff line change @@ -1266,11 +1266,13 @@ describe('MatMdcInput with forms', () => {
12661266 . toBe ( 1 ) ;
12671267 } ) ) ;
12681268
1269- it ( 'should set the proper aria-live attribute on the error messages ' , fakeAsync ( ( ) => {
1269+ it ( 'should be in a parent element with the an aria-live attribute to announce the error' , fakeAsync ( ( ) => {
12701270 testComponent . formControl . markAsTouched ( ) ;
12711271 fixture . detectChanges ( ) ;
12721272
1273- expect ( containerEl . querySelector ( 'mat-error' ) ! . getAttribute ( 'aria-live' ) ) . toBe ( 'polite' ) ;
1273+ expect (
1274+ containerEl . querySelector ( '[aria-live]:has(mat-error)' ) ! . getAttribute ( 'aria-live' ) ,
1275+ ) . toBe ( 'polite' ) ;
12741276 } ) ) ;
12751277
12761278 it ( 'sets the aria-describedby to reference errors when in error state' , fakeAsync ( ( ) => {
You can’t perform that action at this time.
0 commit comments