cypress-axe
cypress-axe copied to clipboard
Inconsistent color contrast calculation
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 -

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

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

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?
I guess something of this https://github.com/dequelabs/axe-core/issues?q=is%3Aissue+is%3Aopen+contrast+label%3A%22color+contrast%22
Any updates on this? We are still experiencing this issue