Skip to content

Commit

Permalink
fix(slide-toggle): label not being read out by JAWS (#14304)
Browse files Browse the repository at this point in the history
Along the same lines as #4610. Adds an extra element to allow for JAWS to pick up the label.
  • Loading branch information
crisbeto authored and jelbourn committed Dec 3, 2018
1 parent 9778af2 commit 754414b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/slide-toggle/slide-toggle.html
Expand Up @@ -38,6 +38,8 @@
</div>

<span class="mat-slide-toggle-content" #labelContent (cdkObserveContent)="_onLabelTextChange()">
<!-- Add an invisible span so JAWS can read the label -->
<span style="display:none">&nbsp;</span>
<ng-content></ng-content>
</span>
</label>

0 comments on commit 754414b

Please sign in to comment.