File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1111 [attr.aria-label] ="ariaLabel || null "
1212 [attr.aria-labelledby] ="ariaLabelledby "
1313 [attr.aria-describedby] ="ariaDescribedby "
14+ [attr.aria-checked] ="indeterminate ? 'mixed' : null "
1415 [attr.name] ="name "
1516 [attr.value] ="value "
1617 [checked] ="checked "
Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ describe('MDC-based MatCheckbox', () => {
5555
5656 expect ( checkboxInstance . checked ) . toBe ( true ) ;
5757 expect ( inputElement . checked ) . toBe ( true ) ;
58+ expect ( inputElement . hasAttribute ( 'aria-checked' ) )
59+ . withContext ( 'Expect aria-checked attribute to not be used' )
60+ . toBe ( false ) ;
5861
5962 testComponent . isChecked = false ;
6063 fixture . detectChanges ( ) ;
@@ -103,9 +106,6 @@ describe('MDC-based MatCheckbox', () => {
103106
104107 expect ( inputElement . checked ) . toBe ( false ) ;
105108 expect ( inputElement . indeterminate ) . toBe ( true ) ;
106- expect ( inputElement . hasAttribute ( 'aria-checked' ) )
107- . withContext ( 'Expect aria-checked attribute to not be used' )
108- . toBe ( false ) ;
109109
110110 testComponent . isIndeterminate = false ;
111111 fixture . detectChanges ( ) ;
@@ -145,9 +145,6 @@ describe('MDC-based MatCheckbox', () => {
145145 expect ( inputElement . indeterminate ) . toBe ( true ) ;
146146 expect ( inputElement . checked ) . toBe ( true ) ;
147147 expect ( testComponent . isIndeterminate ) . toBe ( true ) ;
148- expect ( inputElement . hasAttribute ( 'aria-checked' ) )
149- . withContext ( 'Expect aria-checked attribute to not be used' )
150- . toBe ( false ) ;
151148
152149 inputElement . click ( ) ;
153150 fixture . detectChanges ( ) ;
You can’t perform that action at this time.
0 commit comments