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 11
11
[attr.aria-label] ="ariaLabel || null "
12
12
[attr.aria-labelledby] ="ariaLabelledby "
13
13
[attr.aria-describedby] ="ariaDescribedby "
14
+ [attr.aria-checked] ="indeterminate ? 'mixed' : null "
14
15
[attr.name] ="name "
15
16
[attr.value] ="value "
16
17
[checked] ="checked "
Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ describe('MDC-based MatCheckbox', () => {
55
55
56
56
expect ( checkboxInstance . checked ) . toBe ( true ) ;
57
57
expect ( inputElement . checked ) . toBe ( true ) ;
58
+ expect ( inputElement . hasAttribute ( 'aria-checked' ) )
59
+ . withContext ( 'Expect aria-checked attribute to not be used' )
60
+ . toBe ( false ) ;
58
61
59
62
testComponent . isChecked = false ;
60
63
fixture . detectChanges ( ) ;
@@ -103,9 +106,6 @@ describe('MDC-based MatCheckbox', () => {
103
106
104
107
expect ( inputElement . checked ) . toBe ( false ) ;
105
108
expect ( inputElement . indeterminate ) . toBe ( true ) ;
106
- expect ( inputElement . hasAttribute ( 'aria-checked' ) )
107
- . withContext ( 'Expect aria-checked attribute to not be used' )
108
- . toBe ( false ) ;
109
109
110
110
testComponent . isIndeterminate = false ;
111
111
fixture . detectChanges ( ) ;
@@ -145,9 +145,6 @@ describe('MDC-based MatCheckbox', () => {
145
145
expect ( inputElement . indeterminate ) . toBe ( true ) ;
146
146
expect ( inputElement . checked ) . toBe ( true ) ;
147
147
expect ( testComponent . isIndeterminate ) . toBe ( true ) ;
148
- expect ( inputElement . hasAttribute ( 'aria-checked' ) )
149
- . withContext ( 'Expect aria-checked attribute to not be used' )
150
- . toBe ( false ) ;
151
148
152
149
inputElement . click ( ) ;
153
150
fixture . detectChanges ( ) ;
You can’t perform that action at this time.
0 commit comments