Fix any of the following:
Form element does not have an implicit (wrapped) <label>
Form element does not have an explicit <label>
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute
Element has no placeholder attribute
Element's default semantics were not overridden with role="none" or role="presentation"
Environment
Microsoft Edge version 126.0.0.0
This accessibility issue was found using Accessibility Insights for Web 2.43.0 (axe-core 4.8.4), a tool that helps find and fix accessibility issues. Get more information & download this tool at http://aka.ms/AccessibilityInsights.
Screenshot
Proposed Solution
Switch should have aria-labelledby=<id of "Mode" text> or aria-label="Mode". Aria-labelledby preferred, since if the visible text ever changes, the accessible name will match the changed text.
Problem/Concern
The light/dark switch in the Components sidebar is not properly labeled, resulting in accessibility issues:
Issue
Ensures every form element has a label
(label)Target application
A11y ThemeBuilder
Element path
.MuiSwitch-input
Snippet
<input class="PrivateSwitchBase-input MuiSwitch-input css-1m9pwf3" type="checkbox" aria-label="">
How to fix
Environment
Microsoft Edge version 126.0.0.0 This accessibility issue was found using Accessibility Insights for Web 2.43.0 (axe-core 4.8.4), a tool that helps find and fix accessibility issues. Get more information & download this tool at http://aka.ms/AccessibilityInsights.
Screenshot
Proposed Solution
Switch should have
aria-labelledby=<id of "Mode" text>
or aria-label="Mode". Aria-labelledby preferred, since if the visible text ever changes, the accessible name will match the changed text.