We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68b9a45 commit 872ed88Copy full SHA for 872ed88
src/material/slide-toggle/slide-toggle.html
@@ -53,11 +53,15 @@
53
</span>
54
</button>
55
56
- <!--
57
- Clicking on the label will trigger another click event from the button.
58
- Stop propagation here so other listeners further up in the DOM don't execute twice.
59
- -->
60
- @if (!hideLabel) {
+ @if (hideLabel) {
+ <div class="aria-hidden" [attr.id]="_labelId">
+ <ng-content></ng-content>
+ </div>
+ } @else {
61
+ <!--
62
+ Clicking on the label will trigger another click event from the button.
63
+ Stop propagation here so other listeners further up in the DOM don't execute twice.
64
+ -->
65
<label class="mdc-label" [for]="buttonId" [attr.id]="_labelId" (click)="$event.stopPropagation()">
66
<ng-content></ng-content>
67
</label>
0 commit comments