mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 06:06:37 +03:00
Previously checkColors bailed out whenever an ancestor used a gradient background, since resolveBackground returned null. As a result, gray or low-contrast text inside any gradient container was completely invisible to both rules — e.g. the gray heading on bad-contrast.html. Add a resolveGradientStops fallback that walks parents for gradient stops and runs contrast against the worst-case stop, plus gray-on-color when every stop is chromatic. parseGradientColors now also accepts hex so jsdom fixtures with raw inline gradients work too. Extended the color-should-flag fixture and tests to cover the gradient case. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>