Created
August 11, 2025 23:39
-
-
Save WestonThayer/36851873087c4b5161b2be772b896dd9 to your computer and use it in GitHub Desktop.
axe-core highlight what text nodes were passed by the color-contrast rule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Drop in https://unpkg.com/axe-core in console, then... | |
| (await window.axe.run()).passes.find(p => p.id === "color-contrast").nodes.forEach(n => n.target.forEach(t => document.querySelector(t).style.backgroundColor = "pink")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment