|
1 | | -<div mat-internal-form-field [labelPosition]="labelPosition" (click)="_preventBubblingFromLabel($event)"> |
| 1 | +<div |
| 2 | + mat-internal-form-field |
| 3 | + [labelPosition]="_labelPosition()" |
| 4 | + (click)="_preventBubblingFromLabel($event)" |
| 5 | +> |
2 | 6 | <div #checkbox class="mdc-checkbox"> |
3 | 7 | <!-- Render this element first so the input is on top. --> |
4 | 8 | <div class="mat-mdc-checkbox-touch-target" (click)="_onTouchTargetClick()"></div> |
5 | | - <input #input |
6 | | - type="checkbox" |
7 | | - class="mdc-checkbox__native-control" |
8 | | - [class.mdc-checkbox--selected]="checked" |
9 | | - [attr.aria-label]="ariaLabel || null" |
10 | | - [attr.aria-labelledby]="ariaLabelledby" |
11 | | - [attr.aria-describedby]="ariaDescribedby" |
12 | | - [attr.aria-checked]="indeterminate ? 'mixed' : null" |
13 | | - [attr.aria-controls]="ariaControls" |
14 | | - [attr.aria-disabled]="disabled && disabledInteractive ? true : null" |
15 | | - [attr.aria-expanded]="ariaExpanded" |
16 | | - [attr.aria-owns]="ariaOwns" |
17 | | - [attr.name]="name" |
18 | | - [attr.value]="value" |
19 | | - [checked]="checked" |
20 | | - [indeterminate]="indeterminate" |
21 | | - [disabled]="disabled && !disabledInteractive" |
22 | | - [id]="inputId" |
23 | | - [required]="required" |
24 | | - [tabIndex]="disabled && !disabledInteractive ? -1 : tabIndex" |
25 | | - (blur)="_onBlur()" |
26 | | - (click)="_onInputClick()" |
27 | | - (change)="_onInteractionEvent($event)"/> |
| 9 | + <input |
| 10 | + #input |
| 11 | + type="checkbox" |
| 12 | + class="mdc-checkbox__native-control" |
| 13 | + [class.mdc-checkbox--selected]="_isChecked()" |
| 14 | + [attr.aria-label]="_ariaLabel() || null" |
| 15 | + [attr.aria-labelledby]="_ariaLabelledby() || null" |
| 16 | + [attr.aria-describedby]="_ariaDescribedby() || null" |
| 17 | + [attr.aria-checked]="indeterminate ? 'mixed' : null" |
| 18 | + [attr.aria-controls]="_ariaControls() || null" |
| 19 | + [attr.aria-disabled]="_disabled() && _disabledInteractive() ? true : null" |
| 20 | + [attr.aria-expanded]="_ariaExpanded()" |
| 21 | + [attr.aria-owns]="_ariaOwns() || null" |
| 22 | + [attr.name]="_name() || null" |
| 23 | + [attr.value]="_value() || null" |
| 24 | + [checked]="_isChecked()" |
| 25 | + [indeterminate]="indeterminate" |
| 26 | + [disabled]="_disabled() && !_disabledInteractive()" |
| 27 | + [id]="inputId()" |
| 28 | + [required]="_isRequired()" |
| 29 | + [tabIndex]="_disabled() && !_disabledInteractive() ? -1 : _tabIndex()" |
| 30 | + (blur)="_onBlur()" |
| 31 | + (click)="_onInputClick()" |
| 32 | + (change)="_onInteractionEvent($event)" |
| 33 | + /> |
28 | 34 | <div class="mdc-checkbox__ripple"></div> |
29 | 35 | <div class="mdc-checkbox__background"> |
30 | | - <svg class="mdc-checkbox__checkmark" |
31 | | - focusable="false" |
32 | | - viewBox="0 0 24 24" |
33 | | - aria-hidden="true"> |
34 | | - <path class="mdc-checkbox__checkmark-path" |
35 | | - fill="none" |
36 | | - d="M1.73,12.91 8.1,19.28 22.79,4.59"/> |
| 36 | + <svg class="mdc-checkbox__checkmark" focusable="false" viewBox="0 0 24 24" aria-hidden="true"> |
| 37 | + <path |
| 38 | + class="mdc-checkbox__checkmark-path" |
| 39 | + fill="none" |
| 40 | + d="M1.73,12.91 8.1,19.28 22.79,4.59" |
| 41 | + /> |
37 | 42 | </svg> |
38 | 43 | <div class="mdc-checkbox__mixedmark"></div> |
39 | 44 | </div> |
40 | | - <div class="mat-mdc-checkbox-ripple mat-focus-indicator" mat-ripple |
| 45 | + <div |
| 46 | + class="mat-mdc-checkbox-ripple mat-focus-indicator" |
| 47 | + mat-ripple |
41 | 48 | [matRippleTrigger]="checkbox" |
42 | | - [matRippleDisabled]="disableRipple || disabled" |
43 | | - [matRippleCentered]="true"></div> |
| 49 | + [matRippleDisabled]="_disableRipple() || _disabled()" |
| 50 | + [matRippleCentered]="true" |
| 51 | + ></div> |
44 | 52 | </div> |
45 | 53 | <!-- |
46 | 54 | Avoid putting a click handler on the <label/> to fix duplicate navigation stop on Talk Back |
47 | 55 | (#14385). Putting a click handler on the <label/> caused this bug because the browser produced |
48 | 56 | an unnecessary accessibility tree node. |
49 | 57 | --> |
50 | | - <label class="mdc-label" #label [for]="inputId"> |
| 58 | + <label class="mdc-label" #label [for]="inputId()"> |
51 | 59 | <ng-content></ng-content> |
52 | 60 | </label> |
53 | 61 | </div> |
0 commit comments