Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/material/slide-toggle/slide-toggle.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<label [attr.for]="inputId" class="mat-slide-toggle-label" #label>
<div #toggleBar class="mat-slide-toggle-bar"
<span #toggleBar class="mat-slide-toggle-bar"
[class.mat-slide-toggle-bar-no-side-margin]="!labelContent.textContent || !labelContent.textContent.trim()">

<input #input class="mat-slide-toggle-input cdk-visually-hidden" type="checkbox"
Expand All @@ -10,26 +10,26 @@
[checked]="checked"
[disabled]="disabled"
[attr.name]="name"
[attr.aria-checked]="checked.toString()"
[attr.aria-checked]="checked"
[attr.aria-label]="ariaLabel"
[attr.aria-labelledby]="ariaLabelledby"
(change)="_onChangeEvent($event)"
(click)="_onInputClick($event)">

<div class="mat-slide-toggle-thumb-container" #thumbContainer>
<div class="mat-slide-toggle-thumb"></div>
<div class="mat-slide-toggle-ripple mat-focus-indicator" mat-ripple
<span class="mat-slide-toggle-thumb-container" #thumbContainer>
<span class="mat-slide-toggle-thumb"></span>
<span class="mat-slide-toggle-ripple mat-focus-indicator" mat-ripple
[matRippleTrigger]="label"
[matRippleDisabled]="disableRipple || disabled"
[matRippleCentered]="true"
[matRippleRadius]="20"
[matRippleAnimation]="{enterDuration: 150}">

<div class="mat-ripple-element mat-slide-toggle-persistent-ripple"></div>
</div>
</div>
<span class="mat-ripple-element mat-slide-toggle-persistent-ripple"></span>
</span>
</span>

</div>
</span>

<span class="mat-slide-toggle-content" #labelContent (cdkObserveContent)="_onLabelTextChange()">
<!-- Add an invisible span so JAWS can read the label -->
Expand Down
1 change: 1 addition & 0 deletions src/material/slide-toggle/slide-toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ $mat-slide-toggle-bar-track-width: $mat-slide-toggle-bar-width - $mat-slide-togg
height: $mat-slide-toggle-thumb-size;
width: $mat-slide-toggle-thumb-size;
border-radius: 50%;
display: block;
}

// Horizontal bar for the slide-toggle.
Expand Down