Fluentui: Toggle A11y Pass

Created on 16 Nov 2018  路  9Comments  路  Source: microsoft/fluentui

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

  • [x] Bug 1: [Accessibility][Programmatic access]: Buttons must have discernible text. False positive in Accessibility Insights for Web tool.

Component: Toggle
@micahgodbolt

Accessibility Toggle External Type

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!

All 9 comments

@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:

  • The issue as reported isn't descriptive enough. We should clarify whether an actual ARIA standard is being violated and reference it. I'm not sure if aria-label was inferred or reported outside of this issue's history, but I don't think it's root cause here.
  • aria-label is NOT a required property. In fact, the ARIA standards specify:

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 in aria-label. Instead, we should be using aria-labelledby to point to the existing label text.
  • 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.

Was this page helpful?
0 / 5 - 0 ratings