AccessibleForAll / AccessibleWebDev

A resource for developers wanting to learn the basics of accessibility
https://accessibleweb.dev
MIT License
172 stars 95 forks source link

Insufficient color contrast when active nav link is hovered #351

Closed SatyamSetia closed 1 year ago

SatyamSetia commented 1 year ago

Describe the bug As per 1.4.3 success criteria in WCAG, the color contrast should be at-least 4.5:1 for the visible normal text. But in case of active nav link, when it is hovered, the color contrast is currently 1.56

To Reproduce Steps to reproduce the behavior:

  1. Hover over active nav link.
  2. Try to inspect the color contrast in hovered state using developer tools

Expected behavior Color contrast ratio should be at-least 1.56

Screenshots

Screenshot 2023-07-15 at 11 38 52 PM

Desktop (please complete the following information):

Smartphone (please complete the following information):

SatyamSetia commented 1 year ago

Hey, @EmmaDawsonDev Just wanted to share my interest on working this bug fix if in-case you find it to be a relevant issue to be fixed.

My proposal for the fix - In case there is specific design guideline for this case which makes it fulfil the contrast success criterion then lets go with that. Otherwise, lets make the text color to be black.

EmmaDawsonDev commented 1 year ago

Let's go ahead and make it black for now so that it passes. I'm going to work on the design a bit more in the meantime as I'm not 100% sure about it yet.

SatyamSetia commented 1 year ago

Acknowledged 👍