The icon column (status-column) in the patron bills interface needs to convey its meaning to assistive technologies too

Bug #1818086 reported by Jane Sandberg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Committed
Medium
Unassigned
3.10
Fix Committed
Medium
Unassigned
3.12
Fix Committed
Medium
Unassigned

Bug Description

In the Web client, the patron bills tab in the patron record has a particularly stylish column called status. This column contains a glyphicon icon that represents the status of the bill (a question-sign for lost, an exclamation-sign for long overdue, a clock icon for others). Unfortunately, this meaning is not available to users who use assistive technologies, including screen readers. We should -- at the very least -- put in a title attribute that includes the status. We should probably also add an aria-label.

Alternatively, we could follow FontAwesome's guidance for icons with semantic purpose here: https://fontawesome.com/v4.7.0/accessibility/ -- this wouldn't give the nice tooltip for sighted users, though, which could be helpful for those who are getting used to what these icons mean.

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

Also, the Angular client uses the title attribute approach, which results in the nice tooltip. Probably a good idea to be consistent and use the title attribute (at minimum) in the AngularJS client.

Changed in evergreen:
status: New → Confirmed
tags: removed: webstaffclient
tags: added: circ-billing
removed: billing
Changed in evergreen:
importance: Undecided → Medium
Revision history for this message
Stephanie Leary (stephanieleary) wrote (last edit ):

This branch includes two commits, one for Angular grid flair icons and one for the patron bills icons in AngularJS. https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/sleary/lp1818086-flair-icon-alt-text

(Edited: deleted a request to check something I have now redone and rebased.)

tags: added: pullrequest
Revision history for this message
Gina Monti (gmonti90) wrote :

Trying to test this for bug squash 08/2023. Is the billing interface not working on the Mobius test server?

Revision history for this message
Terran McCanna (tmccanna) wrote :
tags: added: signedoff
Changed in evergreen:
milestone: none → 3.11.2
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thanks, Stephanie! It's working well for me with one exception. I followed the following steps:

1. Found a patron with items checked out
2. Set one of those items to lost
3. Opened the "Bills" tab for that patron
4. Asked VoiceOver to read the grid
5. VoiceOver read "Lost materials" twice!

In the elements tab of the Devtools, it seems like the aria-hidden is missing. For what it is worth, I suspect the "sanitize" feature in the AngularJS ngBindHtml directive. When I add $sce as a dependency for the PatronBillsCtrl controller and change `return "<i class[...] </span>"` to `return $sce.trustAsHtml("<i class[...] </span>")`, the aria-hidden shows up in my Devtools and VoiceOver announces "Lost materials" only once.

Why $sanitize would think "aria-hidden" is more suspicious than "class" or "title" is beyond me hahaha.

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

Thanks, Jane! I know that I often have to prefix ARIA attributes in Angular because it thinks they're invalid. (Maddening.) Should I update the branch with your workaround, or is there another way we can teach the sanitizer to allow aria-hidden more globally?

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

Good question! Theoretically, I thought that adding this line under the "angular.module" line would add it globally for Angularjs 1.6.10 (https://code.angularjs.org/1.6.10/docs/api/ngSanitize/provider/$sanitizeProvider):

.config(['$sanitizeProvider', function($sanitizeProvider) {
    $sanitizeProvider.addValidAttrs(['aria-hidden']);
}])

But it doesn't work?

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

So maybe the workaround is better, until/unless somebody has the capacity to troubleshoot the config and $sanitizeProvider business.

Revision history for this message
Jane Sandberg (sandbergja) wrote (last edit ):

One other note from today's testing: since it's not clear from the semantics of the AngularJS billing page that these icons live in the status column, it would be helpful for the visually hidden text to have a "Status: " prefix.

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

I've updated this branch to add ngSanitize for the ARIA attributes as well as the "Status:" prefix on the new text labels. I have not squashed this yet, so you can review the new commits:
https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/sleary/lp1818086-flair-icon-alt-text

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

I should also note that we could not initially test the Angular grid flair icons using VoiceOver due to the grid ARIA role issue in bug 2038230, but now that we've fixed that bug, the icons should work in both interfaces.

For testing this bug in the Patron Bills screen, use any of the Concerto logins who have an asterisk indicating billing issues, like Gregory Jones, 99999355250. Note that the Status column icon does not necessarily match the Last Billing Type column (on by default), which may indicate a different billing issue. The icon does correspond to the Stop Fines column text, which is off by default.

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

Works great for me on voiceover. Thanks, Stephanie! Signoff branch at user/sandbergja/lp1818086-flair-icon-alt-text-signoff

Changed in evergreen:
assignee: nobody → Terran McCanna (tmccanna)
Revision history for this message
Terran McCanna (tmccanna) wrote :

Thanks Stephanie and Jane!

Fix committed and backported as far back as 3.9

Changed in evergreen:
status: Confirmed → Fix Committed
Revision history for this message
Andrea Neiman (aneiman) wrote :

added 3_10 LP target; 3_9 is closed in LP

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.