Skip to content

Derive the contrast canvas colour from color-scheme and flag ancestor background images - #472

Merged
koddsson merged 7 commits into
fix/467-li-role-in-overridden-listfrom
fix/468-contrast-canvas-colour
Sep 17, 2026
Merged

koddsson merged 7 commits into
fix/467-li-role-in-overridden-listfrom
fix/468-contrast-canvas-colour

Conversation

@koddsson

Copy link
Copy Markdown
Owner

No description provided.

koddsson and others added 5 commits September 16, 2026 15:41
… background images

getEffectiveBackgroundColor returned opaque white whenever no ancestor had
a background-color, which is wrong for pages using color-scheme: dark and
for content inside shadow roots. The walk now continues out of shadow roots
through the host, flattens translucent layers in order, and falls back to a
canvas colour derived from the root element's computed color-scheme.

A background-image on any ancestor, not just the element itself, now marks
a failing result as needsReview. The error payload also carries
backgroundSource, the element whose background-color was used (null for
the canvas), so reports can be verified without reproducing the page.

Closes #468

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@koddsson
koddsson added this pull request to stack #474 September 17, 2026 08:57
@koddsson
koddsson marked this pull request as ready for review September 17, 2026 08:57
@koddsson
koddsson merged commit 57311d4 into main Sep 17, 2026
1 check passed
@koddsson
koddsson deleted the fix/468-contrast-canvas-colour branch September 17, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant