wishlist: better way to ID funds at warning or stop percentages

Bug #1984007 reported by Andrea Neiman
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.10
Fix Released
Medium
Unassigned

Bug Description

Currently in Dojo as well as in the rewritten Angular Acquisitions interfaces, funds dropdowns can show a fund that is color coded yellow (if a fund is at or above its warning level) or red (if a fund is at or above its stop level).

This is problematic on two fronts:
1) Communicating information via color alone is an accessibility issue.
2) Having to look up each fund's balance when an page using that dropdown is opened is not-great from a performance standpoint and systems with large amounts of funds might notice minor lag in pages which load this dropdown.

Anyway, so here's a wishlist bug to (waves hands vaguely) do better here, from an accessibility as well as a performance standpoint.

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Stephanie Leary (stephanieleary) wrote :
tags: added: pullrequest
Revision history for this message
Tiffany Little (tslittle) wrote :

Hi Stephanie, I am very untutored in color accessibility issues, so possibly take this worth a grain of salt. Could we make the color for the stop limit more...aggressive? I think the yellow is great, but I think it would be helpful if the stop limit color looked very definite, rather than a pink/red pastel. If the normal red color that we have currently is accessibility-friendly, I'd prefer that (or something closer to it).

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

Hi, Tiffany! I'll walk through my thought process on this...

The two WCAG rules in play here are 1.4.1, color can't be the only thing used to convey meaning, and 1.4.3, minimum color contrast. I am also imposing a rule of consistency: if one warning has a background color, both should. This is more of a UI best practice, although something like it might end up in the next version of WCAG, which will formalize a lot of usability guidelines related to cognitive ease.

As Andrea noted, currently the red text color is the only thing distinguishing the dangerous funds. Making the text bold and adding icons solves that issue.

Color contrast is a thornier problem. Yellow text doesn't work at all unless it's darkened to the point where it's a burnt orange/brown color that becomes hard to distinguish from red. Stripe's design team did a deep dive on Bootstrap colors: https://stripe.com/blog/accessible-color-systems and determined that the best solution was to use very dark hues for text, paired with the lightest shade as a background color. They demonstrated with badges (at the end of the article, just above the "Conclusion" heading), as does the book Refactoring UI, excerpted here: https://twitter.com/steveschoger/status/1045371124274483200

To meet contrast requirements and still make the difference between warning and stop funds readily apparent, the warning funds need a pale yellow background. For consistency's sake, that means the stop funds need a pink background as well.

The .less-intense-alert CSS style, currently the last one in the main styles.css file, includes a comment that white-on-red alerts are very intense and hard to read when stacked--as funds in this dropdown are very likely to be. This style also uses a pink background.

The color scheme I've used is consistent with my PR on badge contrast, based on the same sources: https://bugs.launchpad.net/evergreen/+bug/1999282 I've been sticking with Bootstrap 5 color tints, but I'm open to fiddling with the exact colors as long as the final result passes WebAIM's contrast checker.

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

I've adjusted the text colors based on Tiffany's feedback. The branch has been updated, and you can preview the colors in this CodePen if that's easier to test:
https://codepen.io/stephanieleary/pen/KKBpNRp

Andrea Neiman (aneiman)
Changed in evergreen:
importance: Undecided → Wishlist
milestone: none → 3.11-beta
Changed in evergreen:
assignee: nobody → Christine Morgan (cmorgan-z)
Changed in evergreen:
assignee: Christine Morgan (cmorgan-z) → nobody
Revision history for this message
Christine Morgan (cmorgan-z) wrote :

Tested on bugsquash.mobiusconsortia.org.

I created 2 funds, one with a 90% warning percentage set and one with a 90% stop percentage set. Then expended money from each fund to trigger the warning and stop percentage.

Looking at the fund dropdown in the PO batch updater and in the item details, the 2 funds displayed as black text on a white background with a badge at the beginning of the text. I did not see the pink and yellow colors that Stephanie previewed in the CodePen.

An image of the dropdown I saw is attached.

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

I'm seeing the same as what Christine reported. The icons appear, but the colors do not. I don't understand why, from a quick glance at the patch, some styles are appearing and others are not.

Also noting that this patch doesn't provide the warning or stop percentage information to screen readers. If that is not done as part of this ticket, we should open a separate ticket for it.

tags: added: needswork
removed: pullrequest
Changed in evergreen:
milestone: 3.11-beta → 3.12-beta
tags: added: pullrequest
removed: needswork
Revision history for this message
Stephanie Leary (stephanieleary) wrote :

I finally found the problem with my CSS selectors (while looking at something else, as one does). I have updated and rebased the branch: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/sleary/lp1984007-funds-dropdown-warnings

You should see color and icons in fund dropdowns, the top of the PO details box, and PO line items (expanded). Let me know if I have overlooked any other areas where funds appear.

Changed in evergreen:
assignee: nobody → Mary Llewellyn (mllewell)
Revision history for this message
Mary Llewellyn (mllewell) wrote :

I'm seeing icons, bold type messages, and color highlights for the warning and stop percents (yellow and pink, respectively)

I have tested this code and consent to signing off on it with my name, Mary Llewellyn and my email address, <email address hidden>.

tags: added: signedoff
Changed in evergreen:
assignee: Mary Llewellyn (mllewell) → nobody
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thanks, Stephanie and Mary! I see this as an accessibility bugfix, rather than a new feature. Therefore, I pushed it to rel_3_10 and above.

Changed in evergreen:
status: Confirmed → Fix Committed
importance: Wishlist → Medium
milestone: 3.12-beta → 3.11.2
Changed in evergreen:
status: Fix Committed → Fix Released
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.