File tree Expand file tree Collapse file tree 3 files changed +36
-24
lines changed Expand file tree Collapse file tree 3 files changed +36
-24
lines changed Original file line number Diff line number Diff line change 1
1
< label [attr.for] ="inputId " class ="mat-checkbox-layout " #label >
2
2
< div class ="mat-checkbox-inner-container "
3
3
[class.mat-checkbox-inner-container-no-side-margin] ="!_hasLabel() ">
4
+ < input #input
5
+ class ="mat-checkbox-input cdk-visually-hidden " type ="checkbox "
6
+ [id] ="inputId "
7
+ [required] ="required "
8
+ [checked] ="checked "
9
+ [value] ="value "
10
+ [disabled] ="disabled "
11
+ [name] ="name "
12
+ [tabIndex] ="tabIndex "
13
+ [indeterminate] ="indeterminate "
14
+ [attr.aria-label] ="ariaLabel "
15
+ [attr.aria-labelledby] ="ariaLabelledby "
16
+ (change) ="_onInteractionEvent($event) "
17
+ (click) ="_onInputClick($event) ">
4
18
< div md-ripple class ="mat-checkbox-ripple "
5
19
[mdRippleTrigger] ="label "
6
20
[mdRippleDisabled] ="_isRippleDisabled() "
21
35
< div class ="mat-checkbox-mixedmark "> </ div >
22
36
</ div >
23
37
</ div >
24
-
25
38
< span class ="mat-checkbox-label " #labelWrapper >
39
+ <!-- Add an invisible span so JAWS can read the label -->
40
+ < span style ="display:none "> </ span >
26
41
< ng-content > </ ng-content >
27
42
</ span >
28
43
</ label >
29
- < input #input
30
- class ="mat-checkbox-input cdk-visually-hidden " type ="checkbox "
31
- [id] ="inputId "
32
- [required] ="required "
33
- [checked] ="checked "
34
- [value] ="value "
35
- [disabled] ="disabled "
36
- [name] ="name "
37
- [tabIndex] ="tabIndex "
38
- [indeterminate] ="indeterminate "
39
- [attr.aria-label] ="ariaLabel "
40
- [attr.aria-labelledby] ="ariaLabelledby "
41
- (change) ="_onInteractionEvent($event) "
42
- (click) ="_onInputClick($event) ">
Original file line number Diff line number Diff line change @@ -418,6 +418,13 @@ $_mat-checkbox-mark-stroke-size: 2 / 15 * $mat-checkbox-size !default;
418
418
}
419
419
}
420
420
421
+ .mat-checkbox-input {
422
+ // Move the input to the bottom and in the middle.
423
+ // Visual improvement to properly show browser popups when being required.
424
+ bottom : 0 ;
425
+ left : 50% ;
426
+ }
427
+
421
428
.mat-checkbox-ripple {
422
429
position : absolute ;
423
430
left : - $_mat-checkbox-ripple-size ;
Original file line number Diff line number Diff line change 10
10
[mdRippleDisabled] ="_isRippleDisabled() "
11
11
[mdRippleCentered] ="true "> </ div >
12
12
</ div >
13
+
14
+ < input #input class ="mat-radio-input cdk-visually-hidden " type ="radio "
15
+ [id] ="inputId "
16
+ [checked] ="checked "
17
+ [disabled] ="disabled "
18
+ [name] ="name "
19
+ [attr.aria-label] ="ariaLabel "
20
+ [attr.aria-labelledby] ="ariaLabelledby "
21
+ (change) ="_onInputChange($event) "
22
+ (click) ="_onInputClick($event) ">
23
+
13
24
<!-- The label content for radio control. -->
14
25
< div class ="mat-radio-label-content " [class.mat-radio-label-before] ="labelPosition == 'before' ">
26
+ <!-- Add an invisible span so JAWS can read the label -->
27
+ < span style ="display:none "> </ span >
15
28
< ng-content > </ ng-content >
16
29
</ div >
17
30
</ label >
18
- < input #input class ="mat-radio-input cdk-visually-hidden " type ="radio "
19
- [id] ="inputId "
20
- [checked] ="checked "
21
- [disabled] ="disabled "
22
- [name] ="name "
23
- [attr.aria-label] ="ariaLabel "
24
- [attr.aria-labelledby] ="ariaLabelledby "
25
- (change) ="_onInputChange($event) "
26
- (click) ="_onInputClick($event) ">
You can’t perform that action at this time.
0 commit comments