dequelabs / axe-core

Accessibility engine for automated Web UI testing
https://www.deque.com/axe/
Mozilla Public License 2.0
5.75k stars 746 forks source link

Color-contrast should skip elements behind a non-native modal backdrop #4441

Open WilcoFiers opened 2 months ago

WilcoFiers commented 2 months ago

Spotted this problem here: https://kanecohen.github.io/modal-vanilla/

Screenshot of axe extension reporting a color contrast issue

Axe-core does not run color-contrast against texts when they are covered by a backdrop op a native HTML <dialog> element. However when you do the same with javascript modal (one that doesn't set aria-hidden=true) the text behind the backdrop is failed for having low contrast when the backdrop is on top of it.