department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
283 stars 204 forks source link

Staging Review finding: Low contrast on `hover` #84241

Closed shiragoodman closed 4 months ago

shiragoodman commented 5 months ago

Need help? Please review how to read a Staging Review ticket. Tag @platform-governance-team-members on Slack if you need further assistance.

Product Information

Team: Cartographers Product: MHV on VA.gov Feature: MHV Secondary Nav

Findings details

VA.gov Experience Standard - issue: User can't perceive an element. VA.gov Experience Standard - category: Comprehension Launch-blocking: No Design System review: No Collab Cycle Reviewer: @briandeconinck (Accessibility)

Description

The hover state of each link meets WCAG minimum requirements --- but only just barely. The vads-color-primary-dark against 0.6 opacity white has a contrast ratio of 4.91:1, which meets WCAG AA's requirement of 4.5:1 but is well below the contrast at the default state (9.6:1).

Even though it meets WCAG AA requirements, I found the change in contrast to be noticeable and the text to be noticeably more difficult to read on hover. Even though it's technically accessible, I think it's a potential point of friction that could be smoothed out.

Link, screenshot or steps to recreate ![The Messages and Medications links in the secondary nav menu. Messages is in the hover state, with dark blue text over a light blue background. Medications is not hovered, with white text against a dark blue background.](https://github.com/department-of-veterans-affairs/va.gov-team/blob/master/platform/working-with-vsp/vsp-collaboration-cycle/staging-review-images/71571-Brian-1.png?raw=true)

Recommended action

From the testing artifact it sounds like this is something you worked on a bit already with Brea, but I'd recommend going back and trying a few more color combinations to see if you can find something with a little higher contrast. I would encourage you to aim for the AAA contrast requirement here, which is a 7:1 contrast ratio.

References


Next Steps for the VFS Team

Cartographers ACs

brea11y commented 5 months ago

I would recommend updating the color of the copy to: vads-color-primary-darker (hex #162e51). This raise the color contrast pretty close to the AAA requirement of 7:1 (it is coming back as 6.94 with a normal font weight). Since the copy is bold in the hover state, it comes back as passing AAA requirements.

allanto-ah commented 4 months ago

Verified the color change on hover and the rounded edges when moving away from hover state.