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

fix: color contrast fails for oklch and oklab with none

Open chutchins25 opened this issue 3 weeks ago • 1 comments

Adds error handling for color-contrast checks. This now will report an 'incomplete' error message when the foreground and/or background color strings were not able to be parsed into an actual color.

Tests also verify that text-shadow color is handled should that occur.

fixes: 4894


Developer Notes: I was not able to have a test case trigger the colorParse error on text-shadow colorParse issues. This case was getting caught already but in the form of the 'complexTextShadows' error.

chutchins25 avatar Dec 05 '25 15:12 chutchins25

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Dec 05 '25 15:12 CLAassistant

Would like @dbjorge or @WilcoFiers to review as well

straker avatar Dec 15 '25 16:12 straker

Would like @dbjorge or @WilcoFiers to review as well

Do you think they may have opinions on the introduction of the incompleteData to color.js? I know when I presented this idea to you, you had mentioned they may have historical reasoning to either do so or not do so.

I had bounced this off them in Slack and they seemed ok with it at a glance and deferred to your judgement.

I am ok either way. Just making sure you are.

chutchins25 avatar Dec 16 '25 15:12 chutchins25