Skip to content

feat(rules): rendered reflow, text spacing and text resize checks (repo#3091) - #2023

Closed
nc9 wants to merge 1 commit into
mainfrom
boat/reflow-rules-3091
Closed

nc9 wants to merge 1 commit into
mainfrom
boat/reflow-rules-3091

Conversation

@nc9

@nc9 nc9 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Adds the cloud rule a11y/rendered-layout for WCAG 1.4.10 reflow, 1.4.12 text spacing and 1.4.4 resize text (repo#3091).

The viewport rendering from repo#1381 does not exist yet, so this reuses the render cloud service: RenderResultItem gains an optional layout probe (reflow, textSpacing, textResize) measured in the page's own browser render, so no second render is paid for. The rule reads it from ctx.cloudResults and skips with a clear reason offline, when nothing was prefetched, or when the render carries no probe. The static a11y/zoom-disabled stays as the offline check.

Acceptance criteria

  • Horizontal scroll at 320px flagged under 1.4.10 with selector and measured width: horizontal scroll at 320px is flagged with the selector and measured width
  • Clipping under text-spacing overrides flagged with element and clipped px: clipped text under the text-spacing overrides names the element and clipped amount
  • Break at 200% text size flagged under 1.4.4: content clipped at 200% text size is flagged under 1.4.4
  • Clean fixture, no findings: a clean fixture produces no findings
  • Reuses the render result and skips offline with a reason: skips offline with the cloud reason, skips when the render carries no layout probe

Verification

  • bun test ./packages/rules/tests/rendered-layout.test.ts: 10 pass
  • registry tests (verdict-scope, template inputs x2, meta-string-limits, max-rules-limit): 803 pass; docs-rule-pages + docs-category-table: 9 pass
  • streaming-rules-canonical-golden pins moved (findings +500, perRuleTally 334); golden-finding-messages-229 snapshot updated
  • typecheck: core-contracts, rules, utils; oxfmt/oxlint on the new files; make validate in docs/ passes
  • Rule counts: Accessibility 63 in README, docs/index.mdx, docs/rules/index.mdx, docs/rules/seo/index.mdx; CHANGELOG bullet; constants comment 333

Residual

The render service does not emit layout yet (private producer, plus the prefetch path skips pages the crawl already rendered). Until it does the rule reports a skip everywhere. Follow-ups are filed privately.

Agent skill

No change needed: the skills do not list rules by name or count.

@nc9

nc9 commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Render-only checks move to private cloud rules, so closing this here.

nik

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