Closed evaoconn closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 94.28%. Comparing base (
22debd5
) to head (b50cd0f
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
Added a new property,
description
to the<md-toggle-switch />
web-component to enable it to accept an accessible description.Related Issue
https://jira-eng-sjc12.cisco.com/jira/browse/CX-10250
Motivation and Context
Without this change, the
<md-toggle-switch />
component could not provide an accessible description because thearia-describedby
property takes the ID of another element to point to. In some cases the description label will be outside the components' shadow DOM, in which case there was no suitable mechanism for providing an accessible description. To circumvent this issue, this PR adds an invisible description label inside the shadow DOM of the component, and if thedescription
property is set, then the underlying<input />
within the component will point to this invisible description label.How Has This Been Tested?
Screenshots:
There are no visual changes to the component with this change. Screenshots show changes in what is read out by Mac VoiceOver when component is focused.
Before (If applicable):
After:
Types of changes
Checklist: