ANDI icon indicating copy to clipboard operation
ANDI copied to clipboard

Fix Invalid Reporting of Numbers for Danger/Caution Items

Open jdpanic opened this issue 5 years ago • 2 comments

Alerts and Errors that appear in the "Accessibility Alerts" tree view have aria-label attributes which directly refer to element numbers. These element numbers do not correspond to the element numbers displayed when tab order indicators are enabled, and are misleading to a11y testers who use screen-readers.

Steps to Reproduce:

  1. Run ANDI on a page, for instance microsoft.com.
  2. Enable tab order numbers by toggling on the "Tab Order Indicators" button.

A. With a screen-reader active, navigate to the first element in the "Accessibility Alerts" section. Notice that an element number is announced at the end of the description of the alert. B. WIthout a screen-reader active, right-click one of the items in the "Accessibility Alerts" section and reveal it's node in your browser's dev console (the node ANDI generated, not the original node of the offending element). Notice that the element has an aria-label attribute which includes an element number at the end (I.e. "danger: Element is hidden from screen reader using [aria-hidden=true]. Element #17"). 4) Click or press enter on the item. Notice that the number that appears next to the item does not match the number that was written in the aria-label in the alerts tree.

Please make sure that element numbers are properly included in the aria-label.

jdpanic avatar Jan 02 '20 22:01 jdpanic

Hi There! Thanks for documenting your experience with this issue.

The tab order numbers do not directly correspond with the Element numbers (element index number) provided in the alert messages.

Sometimes the numbers will match up, sometimes they will not. It depends on whether ANDI finds focusable but non-tabbable elements on the page. These focusable but non-tabbable elements will have an element index, but they will not be given numbers to indicate their position in the tab order. The element index numbers are really supposed to be a behind-the-scenes number that ANDI users shouldn't need to know, however, we appended the indexes onto the alert messages in an attempt to benefit screen reader users. And in your case, we've only confused you! Sorry!

We want to help this be less confusing for users like you and are thinking about some solutions. We don't want to take away any features which you may find helpful. So we might need to have a conversation here.

As a screen reader user, do you find it helpful to know the element index numbers? If we took that away would it hinder you?

Here's where we stand:

  • We definitely don't want to alter the tab order indicator numbers
  • We could add the Element Index numbers to the ANDI Element section, however our fear is that further attempts to lift the curtain on this number is going to cause more confusion. Especially since refreshing ANDI after content changes may re-sort these numbers. For example, Element number 3 might become element number 5 on a refresh. In our opinion, it's best if ANDI users don't know the Element index numbers.
  • We could remove the Element index number from the end of the alert messages and simply replace it with the itemized alert number in the overall list. For example, the fourth alert would say "Alert number 4" instead of "Element number 17"

Thoughts?

JohnCotterSSA avatar Jan 03 '20 15:01 JohnCotterSSA

Having this same issue

AccessAbilityOfficer avatar Nov 08 '23 21:11 AccessAbilityOfficer