Tracking all of the issues brought up with the 11/16 accessibility pass on Toggle control
Details on individual bugs can be found on SharePoint
Component: Toggle
@micahgodbolt
@TestAccessibilityGIT trying to understand the clear change we need to make for this issue. Are you suggesting we render hidden text and cross reference using "for" attribute? Thanks!
@TestAccessibilityGIT Could you please answer David's question from the previous comment? Otherwise I can't do anything with this bug.
@dzearing - The issue is that there is a
There are a few things we need to clarify here:
aria-label
was inferred or reported outside of this issue's history, but I don't think it's root cause here.If the label text is visible on screen, authors SHOULD use aria-labelledby and SHOULD NOT use aria-label.
- If
Toggle
has a descriptive label on it, we should NOT be redundantly putting this information inaria-label
. Instead, we should be usingaria-labelledby
to point to the existing label text.
- No ARIA is better than bad ARIA. Don't be redundant.
- This bug sounds like it could be an app bug. If the app is providing label text for Toggles and it is not being narrated (
aria-labelledby
is not set), only then does it sound like this is a Fabric bug.
+Amit
This issue was found using tool (Accessibility Insights for Web) and these are the fixes hint provided by the tool.
Fix ONE of the following:
Element has a value attribute and the value attribute is empty
Element has no value attribute or the value attribute is empty
Element does not have inner text that is visible to screen readers
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's default semantics were not overridden with role="presentation"
Element's default semantics were not overridden with role="none"
Element has no title attribute or the title attribute is empty
so as mentioned by @JasonGore we are also good if we insert aria-labelledby attribute and provide respective reference to it.
Just to summarize some discussions that happened outside of this issue thread, the Accessibility Insights for Web team seems to agree that the use of the for
attribute with label
and button
is enough to define their relationship and that using aria-label
or aria-labelledby
is redundant with the existing for
attribute. The Accessibility Insights for Web team entered an issue essentially verifying that this is a false error.
+Amit
Thanks @JasonGore for summarizing the discussions that happened outside of the issue thread. Given the conclusion achieved from said discussions, I'm closing this issue.
Thanks to everyone involved.
Most helpful comment
@TestAccessibilityGIT trying to understand the clear change we need to make for this issue. Are you suggesting we render hidden text and cross reference using "for" attribute? Thanks!