cypress-axe icon indicating copy to clipboard operation
cypress-axe copied to clipboard

Inconsistent color contrast calculation

Open DhirajKhot opened this issue 4 years ago • 2 comments
trafficstars

The color contrast ratio differs everytime upon running the scan and sometimes reports the violated result for the same styled element.

Below is the snapshot of the computed style of the element for which issue is being reported - image

For the same element we get violations with different color contrast ratios - image image image

I tried logging the actual value of the color of the desired element during the run. It logs the correct desired color value - image

Color logged is rgb(96, 94, 92) which is #605e5c But the axe is assigning fgColor as #9b9998 and hence violating the rule for color contrast.

Any idea what could be the issue here?

DhirajKhot avatar May 12 '21 10:05 DhirajKhot

I guess something of this https://github.com/dequelabs/axe-core/issues?q=is%3Aissue+is%3Aopen+contrast+label%3A%22color+contrast%22

stereobooster avatar Jun 07 '21 07:06 stereobooster

Any updates on this? We are still experiencing this issue

DanielleCogs avatar May 03 '22 17:05 DanielleCogs