Add aria-describedby when multiple links have identical text

Bug #2016343 reported by Stephanie Leary
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Committed
Wishlist
Unassigned
3.11
Fix Committed
Undecided
Unassigned

Bug Description

When there are repetitive links (view, edit, delete) for multiple items on a page, it is difficult for screen reader users to differentiate between them using the link list feature. The recommended way to handle this is to add the aria-describedby attribute to each link. The attribute should contain one or more IDs referring to some other elements on the page that contain a title, call number, or any other text that helps identify the individual item in question.

References:
https://www.w3.org/WAI/GL/wiki/Using_aria-describedby_for_link_purpose_-_May_2014
https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/#describingtechniques

The item table in the staff catalog contains identical links for every row in the grid. These links need aria-describedby attributes to append the call number, barcode, part, or anything else that is appropriate in the context of the column.

Revision history for this message
Stephanie Leary (stephanieleary) wrote :

This branch adds the barcode (for lack of anything better) to links in the items table. I'm very open to ideas on anything else we could add here to create a better audible user experience.

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/sleary/lp2016343-aria-describedby-item-table

tags: added: pullrequest
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thanks, Stephanie! I think it's definitely a step in the right direction. Your patch really got my gears turning, so here are a few thoughts:

1. I'm not sure that aria-describedby is the best tool for the job when it comes to lists of links. I tried your patch in NVDA and VoiceOver. NVDA announced the item barcode after the visible link text when focused, but it did not appear in the elements list (which just had "Edit", "View", etc.). On VoiceOver, when I focused one of the links, it gave me the option to listen to the barcode, but as with NVDA, the barcodes did not appear in the link names in the rotor.

2. Both the call number and barcode edit links were announced as "Edit FIC400001583". The call number "edit" links should be announced differently than the item "edit" links -- maybe they could be labeled by the call number label text (e.g. FIC 223)?

3. The "view" link in the barcode column will also need some differentiation.

4. I wonder if labeling the items by their row number, rather than their barcode, might be a better user experience. On the one hand, listening all the way through a barcode number just to see if the very last digit matches what you expect is a little rough; on the other hand, the barcode is more meaningful than just the row number.

Revision history for this message
Stephanie Leary (stephanieleary) wrote :

Thanks for trying this out, Jane! It's frustrating that the description isn't included in the list. If we add sr-only text to the link itself, it'll foul things up for dictation users; the accessible name has to match what's visible on screen.

I thought about using the row number. Would that be at all helpful when the links are out of context? Virtually anything would be better than the barcode, I would think.

I've updated the branch to distinguish the two Edit links and fix the View link, but that doesn't address the larger issues with the link list. I have not added the row number for now.

Once we reach an acceptable solution here, we will need to make a list of other screens that have repetitive links like this, and apply the same fix throughout.

Revision history for this message
Stephanie Leary (stephanieleary) wrote :

Some further reading on this:
https://adrianroselli.com/2022/04/accessible-description-exposure.html
https://benmyers.dev/blog/aria-labels-and-descriptions/#aria-describedby

It appears to be the expected behavior that the description is included in some modes, but not others (including the VO rotor). It does get included when the item has focus.

Andrea Neiman (aneiman)
Changed in evergreen:
milestone: none → 3.next
status: New → Incomplete
status: Incomplete → Confirmed
importance: Undecided → Wishlist
milestone: 3.next → 3.11-beta
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thanks for the links, Stephanie -- those were very helpful. I really like the idea of creating a good solution here, and then applying that solution to the other screens that need it.

Upon reading the second link, I feel that the differentiator isn't "longer-form, supplemental information" -- it's core to understanding what the links are and where they go.

One thing I found out recently is that aria-labeledby can refer to itself, e.g.:

<span id="barcode-2">My Barcode</span>
<button id="edit-2" aria-labeledby="edit-2 barcode-2">Edit</button>

This announces "Edit My Barcode" in VoiceOver when the button has focus. It announces the same in the rotor. I'm not sure what the implications are for voice control, though.

Revision history for this message
Blake GH (bmagic) wrote :

Noting merge conflicts for both commits on master today

tags: added: needsrebase
Revision history for this message
Stephanie Leary (stephanieleary) wrote :

Conflicts taken care of; thanks to Blake and Jason B for troubleshooting!

tags: removed: needsrebase
Changed in evergreen:
milestone: 3.11-beta → 3.12-beta
Changed in evergreen:
assignee: nobody → Terran McCanna (tmccanna)
Revision history for this message
Terran McCanna (tmccanna) wrote :

Works for me! Signed off and fix pushed as far back as 3.11 (did not apply cleanly to 3.10)

Changed in evergreen:
status: Confirmed → Fix Committed
tags: added: signedoff
Changed in evergreen:
assignee: Terran McCanna (tmccanna) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.