File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 11< div mat-internal-form-field [labelPosition] ="labelPosition " (click) ="_preventBubblingFromLabel($event) ">
22 < div #checkbox class ="mdc-checkbox ">
33 <!-- Render this element first so the input is on top. -->
4- < div class ="mat-mdc-checkbox-touch-target " (click) ="_onTouchTargetClick() "> </ div >
4+ < div
5+ class ="mat-mdc-checkbox-touch-target "
6+ (click) ="_onTouchTargetClick() "
7+ aria-hidden ="true "> </ div >
58 < input #input
69 type ="checkbox "
710 class ="mdc-checkbox__native-control "
2528 (blur) ="_onBlur() "
2629 (click) ="_onInputClick() "
2730 (change) ="_onInteractionEvent($event) "/>
28- < div class ="mdc-checkbox__ripple "> </ div >
29- < div class ="mdc-checkbox__background ">
31+ < div class ="mdc-checkbox__ripple " aria-hidden =" true " > </ div >
32+ < div class ="mdc-checkbox__background " aria-hidden =" true " >
3033 < svg class ="mdc-checkbox__checkmark "
3134 focusable ="false "
32- viewBox ="0 0 24 24 "
33- aria-hidden ="true ">
35+ viewBox ="0 0 24 24 ">
3436 < path class ="mdc-checkbox__checkmark-path "
3537 fill ="none "
3638 d ="M1.73,12.91 8.1,19.28 22.79,4.59 "/>
3739 </ svg >
3840 < div class ="mdc-checkbox__mixedmark "> </ div >
3941 </ div >
40- < div class ="mat-mdc-checkbox-ripple mat-focus-indicator " mat-ripple
42+ < div class ="mat-mdc-checkbox-ripple mat-focus-indicator "
43+ mat-ripple
44+ aria-hidden ="true "
4145 [matRippleTrigger] ="checkbox "
4246 [matRippleDisabled] ="disableRipple || disabled "
4347 [matRippleCentered] ="true "> </ div >
Original file line number Diff line number Diff line change @@ -58,9 +58,9 @@ describe('MatCheckbox', () => {
5858 expect ( inputElement . checked ) . toBe ( false ) ;
5959 } ) ) ;
6060
61- it ( 'should hide the internal SVG ' , ( ) => {
62- const svg = checkboxNativeElement . querySelector ( 'svg ' ) ! ;
63- expect ( svg . getAttribute ( 'aria-hidden' ) ) . toBe ( 'true' ) ;
61+ it ( 'should hide the decorative element ' , ( ) => {
62+ const background = checkboxNativeElement . querySelector ( '.mdc-checkbox__background ' ) ! ;
63+ expect ( background . getAttribute ( 'aria-hidden' ) ) . toBe ( 'true' ) ;
6464 } ) ;
6565
6666 it ( 'should toggle checkbox ripple disabledness correctly' , fakeAsync ( ( ) => {
You can’t perform that action at this time.
0 commit comments