dequelabs / dequelabs/axe-core
Axe fails with new color spec
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 933
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 17
Description
### Product
axe-core
### Product Version
_No response_
### Latest Version
- [X] I have tested the issue with the latest version of the product
### Issue Description
#### Expectation
I’m using `oklch` on my page. I have added a media query to test if the browser supports it, and fall back to `rgb()` if not. I expect `axe-core` to either ignore my `oklch` definitions, or be able to parse them properly.
#### Actual
`axe-core` fails with:
`axe-core Error: Unable to parse color "oklch(0.992 0.03 171.25)”`

#### How to Reproduce
```html
div {
background: #000;
text: white;
}
@supports (color: oklch(0% 0 0)) {
div {
background: oklch(0% 0 0);
}
}
```
#### Additional context
This prevents me from using the new color syntax since my accessibility tests completely break.
Contributor guide
Assessment
This issue has not been assessed yet.