Repository navigation
fix(cli): audit text beneath transparent composition boxes - #5202
Merged
jrusso1020 merged 1 commit intoOct 8, 2026
Merged
jrusso1020 merged 1 commit into
jrusso1020 merged 1 commit into
Conversation
jrusso1020
approved these changes
Oct 8, 2026
jrusso1020
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, this fixes a real gap. A transparent sub-composition host stacked above allow-occlusion text was answering elementFromPoint for the whole block, so contrast was never checked there. Walking the hit stack only through unpainted composition boxes, and stopping at the first painted layer, keeps every real cover intact. The tests cover host, nested-root and inner-root cases, plus each kind of paint that should still count as cover. Possible follow-up: isClippedAway uses the same single-hit probe, so clip-path text under a transparent host may still be skipped.
— Rames
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Visible text marked
data-layout-allow-occlusionis skipped by the contrast audit when a later transparent composition box winselementFromPoint. On current main, both a direct host and a mounted sub-composition reproducecheckexiting successfully with zero contrast checks for text whose measured ratio is 1.57:1.Walk the ordered hit stack through unpainted composition hosts and compiler-produced inner roots, then audit the text when a probe reaches it. Keep the existing behavior for covering paint, generated content, raster/replaced elements, and browsers without
elementsFromPoint. Paint checks are cached only for the current prepare call.Refs #5112 (contrast-audit follow-up). This addresses the audit problem; #5118 changes one registry block, and the font-readiness report remains separate.
Validation:
check: the direct and mounted cases now report three contrast failures across three timestamps. Readable-text controls pass all three checks; a fully opaque cover still passes with no covered-text contrast checks.div/sectioncomposition boxes. This is an audit correction, with no render changes. No claim that all transparent HTML/SVG paint or partial-cover contrast cases are solved.