Skip to content

fix(cli): recognize painted ancestor text backgrounds - #5342

Open
user-github-me wants to merge 3 commits into
heygen-com:mainfrom
user-github-me:fix/older-chrome-gradient-audit
Open

user-github-me wants to merge 3 commits into
heygen-com:mainfrom
user-github-me:fix/older-chrome-gradient-audit

Conversation

@user-github-me

@user-github-me user-github-me commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

What

Accept visible descendant text painted by an ancestor's clipped gradient, solid color, or image when running hyperframes check. Ordinary children on Chrome 148 and children filled by an ancestor url() background currently receive text_not_painted despite visibly painting.

Why

Chrome before 150 omits independently painted descendants from text masks but paints ordinary descendants. The blanket version guard rejects both. Separately, the direct-text audit accepts image backgrounds while the ancestor path rejects them, even when direct and nested headings produce identical PNGs.

Related work

Refs #5117. This addresses both follow-ups requested in the review of #5207. #5338 aligns the container browser with the CLI for the renderer failure. The complete open-PR search found no other implementation touching these audit files.

How

Inspect the child-to-mask paint properties on older Chrome, including intermediate wrappers. Match each background image to its corresponding text clip and preserve the layout-coordinate bounds check. Keep missing layered text reportable on older Chrome, along with transparent gradients, mismatched layers, SVG text, and glyphs outside the mask.

Image acceptance follows the existing direct-text policy: this audit does not decode image alpha or verify successful image loading. A transparent or unavailable image can remain outside this diagnostic's coverage.

Test plan

  • Eight new image regression cases fail against main: four unit cases and four real-browser cases. Screenshot comparisons show visible, identical direct/nested image text.
  • 242 audit tests pass on Chrome 148 and 152, including 51 real-browser cases; all 51 browser cases also pass on Chrome 150. The original older-Chrome gradient regressions remain covered.
  • 232 related contrast, check, layout, and browser-pipeline tests pass on the final combined snapshot.
  • Built CLI: direct, nested, transformed, and mismatched-layer image fixtures pass static lint. Visible text passes strict check on Chrome 152. On Chrome 148, ordinary image text passes while the genuinely missing layered child remains reportable. The mismatched-layer control fails on both versions. Contrast checks remain enabled.
  • Fresh workspace build before validation, rebuilt CLI, CLI typecheck, repository lint, formatting, test reachability, comment checks, and normal commit hooks pass.
  • GitHub verifies the published commits and the final tree matches the locally tested snapshot.

@user-github-me user-github-me changed the title fix(cli): recognize painted gradient children on older Chrome fix(cli): recognize painted ancestor text backgrounds Oct 9, 2026

This branch has not been deployed

No deployments
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