department-of-veterans-affairs / vets-design-system-documentation

Repository for design.va.gov website
https://design.va.gov
40 stars 61 forks source link

[Consideration] improve hint text (and all other non-heading text) to AAA standards #1693

Open joshkimux opened 1 year ago

joshkimux commented 1 year ago

Bug Report

What happened

This consideration emerged from conversations around hint text.

As of now, hint text barely scrapes past AA compliance and may not be enough for folk with low vision looking at their mobile phone in daylight (who can use)

Before 717671

Screenshot 2023-02-09 at 11 10 00 AM

After 212121

A small adjustment from AA (4.5) to AAA (7.0) may make this more legible for situations we can't detect easily in usability testing, and improve legibility as a whole across VA.gov. For example, using @humancompanion-usds 's suggestion of USWDS's $color-gray-warm-dark, we can see significant improvements:

Screenshot 2023-04-19 at 11 06 09 AM

Urgency

How urgent is this request? Please select the approriate option below and/or provide details

Challenges

Visually indistinguishable labels vs. hint text

@humancompanion-usds points out that adjusting to AAA could result in input labels that are either indistinguishable to hint text...

image

or, if we were to increase the darkness of the labels, labels that are of a darker color to body text.

We recommend exploring these tradeoffs in more detail with a designer and accessibility specialist.

jeana-adhoc commented 10 months ago

This also becomes an issue when we put items with hint text in cards with a grey background. Even the lightest gray background is not enough contrast for the hint text.

See [accessibility-defect-1]: Hint text color does not have enough contrast when inside a gray card.

humancompanion-usds commented 9 months ago

@jeana-adhoc - I mocked up some possibilities: https://www.figma.com/file/ROAzhMkIMie79x5tNaocQe/Card?type=design&node-id=0%3A1&mode=design&t=wjFMwLTFORUzw1Ie-1

I'm leaning towards defining a vads-label-hint-text-color-on-dark that is vads-color-base-darker. It passes AAA and looks different enough from the label color to work. But I'd like some more eyes on it.