-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Open
Labels
AccessibilityThis issue is related to accessibility (a11y)This issue is related to accessibility (a11y)P5The team acknowledges the request but does not plan to address it, it remains open for discussionThe team acknowledges the request but does not plan to address it, it remains open for discussionarea: material/slide-toggle
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
Using the https://validator.w3.org/nu/ validator the mat-slide-toggle gets reported as an aerror because it uses an arua-checked attribute on a input with the role of checkbox.
This has already been discussed here, but I have not found a report in this repository yet.
Reproduction
Steps to reproduce:
- Add a simple mat-slide-toggle to a template
- Observe the output html
Expected Behavior
The component should use native html features instead of aria attributes wherever possible
Actual Behavior
The component gets rendered as follows
<input type="checkbox" role="switch" class="mat-slide-toggle-input cdk-visually-hidden" id="test-input" tabindex="0" aria-checked="true">
Environment
- Angular: 13.3.11
- CDK/Material: 13.3.9
- Browser(s): Chrome 102.0
Metadata
Metadata
Assignees
Labels
AccessibilityThis issue is related to accessibility (a11y)This issue is related to accessibility (a11y)P5The team acknowledges the request but does not plan to address it, it remains open for discussionThe team acknowledges the request but does not plan to address it, it remains open for discussionarea: material/slide-toggle