Skip to content

test(rtl): a verified-N/A reason closes VisuallyHidden's RTL coverage gap - #13906

Merged
cixzhang merged 2 commits into
mainfrom
test/rtl-visually-hidden-verified-na
Nov 27, 2026
Merged

cixzhang merged 2 commits into
mainfrom
test/rtl-visually-hidden-verified-na

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Primary intent

RTL audit coverage, test-only (VisuallyHidden's case was first written up in @freddymeta's #5885): the verified-N/A registry gets a duplicate check, and VisuallyHidden gets a reason-backed verified-N/A entry in apps/storybook/rtl-audit/verified-not-applicable.json, so the RTL audit reports it as verified N/A instead of a coverage gap.

User impact

  • Product: no change.
  • Maintainers: the RTL audit, both a PR's touched-components check and the release check, stops showing VisuallyHidden's RTL column as ✗. That ✗ meant "every dimension is N/A and no reason is recorded", not an RTL failure.

Change

  • .github/scripts/rtl-audit-coverage.test.mjs: a test that the registry declares each component once, case-insensitively. The coverage rollup keys declarations by component, so a second entry for one component would otherwise silently replace the first.
  • apps/storybook/rtl-audit/verified-not-applicable.json: one core/VisuallyHidden entry.
    • Reason: one clipped 1px element, pinned with logical insets; no glyph, decoration, pointer input, order, scroll, drag, overlay or keyboard behavior.
    • Source receipts: sha256 receipts for the story file, VisuallyHidden.tsx and index.ts at this pull request's base.

Authority

architecture:rtl-audit-evidence OQ1 (resolved): a component-wide verified N/A is admitted when the registry gives a specific reason and the LTR/RTL audit finds no applicable dimension in its stories. An applicable dimension would make the entry stale and fail the audit (INV8).

Evidence

  • Audit finding: the touched-components RTL audit on the head that fix(VisuallyHidden): declare the ignored xstyle where the lint rule reads it; require-baseprops-passthrough errors in strict #13881 merged rendered all three VisuallyHidden stories (Default, Supplementary Context, Live Region) in LTR and RTL.
    • D1: no directional icons.
    • D5-positional: no candidates.
    • D6: no decorations.
    • Coverage: coverage-gap, "all dimensions are N-A and no verified-N/A reason is recorded".
  • Source: the clip block is position: absolute, 1px, overflow: hidden, clip: rect(0, 0, 0, 0), with insetBlockStart/insetInlineStart: 0, pointerEvents: none and userSelect: none. No physical inline property.
  • Scoped RTL audit with this entry: rtl-audit.mjs --packages core --filter core/visuallyhidden, run against the Storybook built for fix(VisuallyHidden): declare the ignored xstyle where the lint rule reads it; require-baseprops-passthrough errors in strict #13881's head (VisuallyHidden's stories and source match this base), reports:
    • AUTO: 0 pass / 0 fail / 1 N-A, PM: 0 pass / 0 fail / 3 N-A, DEC: 0 pass / 0 fail / 3 N-A;
    • COV: 0 measured / 1 verified N-A / 0 gap / 0 stale, with core/VisuallyHidden at "status": "verified-na".
  • Full sweep: this registry is a shared routing-policy file, so a ci:run-rtl run here would be the full nine-leg audit. Main's next full RTL audit confirms it after merge.
  • Duplicate test, red first: with a second copy of the last entry appended, "declares each component once" fails and names core/VisuallyHidden; with the real registry it passes.
  • Checks: rtl-audit-coverage.test.mjs passes (82), as do the audit-scope and a11y-scope tests; prettier is clean.

Scope

RTL audit registry only.

Overlap

Overlap checked: #13892, #13829, #13762, #13735, #11509, #10087, #10042, #10041, #10040, #9304, #5885, #5714. How each changes verified-not-applicable.json against its base:

None touches core/VisuallyHidden except #5885. Whichever lands second merges the array.

Owner and land path

  • Owner: Astryx maintainers, fix-loop lane 1.
  • Land path: draft; Specs consistency, code review, CI, merge.

@vercel

vercel Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 27, 2026 4:13pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 27, 2026
@astracat-bot

astracat-bot Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 27, 2026, 5:19 PM UTC

@cixzhang cixzhang added the lane:1 Astryx fix-loop lane 1 owns this label Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 2d4a55c

Storybook · Sandbox · built from this PR's head

Package size: no published package changed; no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.

CI impact: 0 job-min per update · pool 0% · time to green +1 min · standard runners · 1 CI action or script file changed (not measured)
Before After Change
Job-minutes per PR update 211.8 211.8 0
Runner pool, runner-minutes a day 35,247 35,247 0 (0%)
Average concurrent jobs 24.5 24.5 0
Time to green (median → this run) 21.3 min 22.3 min +1 min
Runs a day 166 166 0

Not measured (the jobs that use these keep their recent minutes above): .github/scripts/rtl-audit-coverage.test.mjs.

Assumptions: before is each job's average over the last 20 pull-request runs; after keeps that for unchanged jobs and uses this run's minutes for added or changed ones, weighted by how often each changed job ran in those runs; runs a day averages the seven whole days before today; time to green compares this run with the median of those runs that ran the same jobs.


Generated by PR Enrichment workflow | View full report

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 221d085

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The entry itself holds up — its reason matches VisuallyHidden.tsx line for line, the three sha256 receipts match the files at this head, and the audit's own coverage rollup turns the component's coverage-gap into verified-na with no stale flag. One thing in the description does not hold.

  • The Overlap line says that none of #13892, #13829, #13762, #13735, #11509, #10087, #10042, #10041, #10040, #9304, #5885 and #5714 covers VisuallyHidden, but #5885 adds its own core/VisuallyHidden entry, with its own reason and receipts, to the same apps/storybook/rtl-audit/verified-not-applicable.json; the registry is a flat array keyed by component name with no duplicate check, so if both land the component carries two declarations and the later reason silently wins. Correct the Overlap line and keep the entry in one of the two pull requests.

One thing worth knowing rather than fixing: nothing reads the evidence map today, so the receipts do not make the entry go stale when VisuallyHidden.tsx changes — a later applicable audit dimension is still what invalidates it.

Claims and files checked

Review mode: full; reason: no-earlier-review

Claims:

  • Test-only change adding a reason-backed verified-N/A entry for VisuallyHidden, so the audit reports verified N/A instead of a coverage gap — verified (the appended entry; the audit's rollup returns verified-na on this registry and coverage-gap without it).
  • No product change — verified (the only changed file is a Storybook-app registry that no published package imports).
  • The RTL column stops showing ✗ for VisuallyHidden in a pull request's touched-components check and in the release check — verified (a coverage gap is what marks that cell failed and what makes the full-roster run exit non-zero); note the cell becomes “no check applies”, not a pass.
  • That ✗ meant every dimension N/A with no recorded reason, not an RTL failure — verified (it is the rollup's own note text).
  • Reason: one clipped 1px element pinned with logical insets, no glyph, decoration, pointer input, order, scroll, drag, overlay or keyboard behaviour — verified against the component source.
  • sha256 receipts for the story file, the component and its index at the base — verified (all three match, at the base and at this head).
  • The governing record admits a reason-backed component-wide verified N/A, and an applicable dimension makes the entry stale — verified against the current record and reproduced in the rollup.
  • The audit run on the earlier head rendered all three stories in both directions with D1, D5 and D6 non-applicable — reported (an author's run; the detectors' own conditions match nothing in those stories on inspection).
  • Audit coverage, audit-scope and a11y-scope tests pass (129), prettier clean — reported (not re-run in this review).
  • Overlap: none of the listed pull requests covers VisuallyHidden — false, see the finding above.
  • Scope: RTL audit registry only — verified (one changed file).

Files:

  • apps/storybook/rtl-audit/verified-not-applicable.json — one appended entry, well formed and consistent with the registry's convention; the overlap finding above is about it.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 2d4a55c

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The VisuallyHidden entry and the new duplicate check hold up: the reason matches the component's clip block, the three receipts match the files, the audit's own coverage rollup turns the coverage gap into verified N/A, and the duplicate check fails on a repeated entry and passes on this registry. One sentence in the description does not hold.

  • The Overlap line says the other listed pull requests “add entries for other components”, but #13892 and #13829 each remove an existing entry (core/Section and richtext/RichTextView) and #11509 does not change verified-not-applicable.json at all, so say which add, which remove, and that #11509 does not touch the registry.

The earlier point about #5885 is addressed: the Overlap line now names its competing entry, and the new test fails CI if both entries ever land.

Claims and files checked

Review mode: incremental; reason: none

Claims:

  • Test-only RTL audit coverage change — verified (one CI test and the Storybook-app registry; no published package changes).
  • VisuallyHidden's case was first written up in #5885 — verified (#5885 carries an earlier VisuallyHidden entry).
  • The registry gets a duplicate check that compares names case-insensitively — verified (the new test lowercases each name; re-run red and green, including a case variant).
  • The coverage rollup keys declarations by component, so a second entry would silently replace the first — verified (the rollup run with a duplicate entry reports the second reason and no warning).
  • The audit reports VisuallyHidden as verified N/A instead of a coverage gap — verified (the rollup returns a coverage gap on the base registry and verified N/A on this one).
  • No product change — verified (the registry's only readers are the audit harness and its tests).
  • The RTL cell stops showing ✗ in the touched-components check and the release check, and that ✗ meant all-N/A with no reason — verified (the cell becomes “no RTL check applies”, not a pass, and the release check loses one coverage-gap row).
  • The reason: one clipped 1px element pinned with logical insets, no glyph, decoration, pointer input, order, scroll, drag, overlay or keyboard behaviour — verified against the component source.
  • sha256 receipts for the story, the component and its index at the base — verified (all three match at the base and at this head).
  • The governing record admits a reason-backed verified N/A, and an applicable dimension makes the entry stale and fail — verified (record text; the rollup returns stale with one applicable dimension).
  • The clip block's properties, with no physical inline property — verified against the component source.
  • The touched-components audit on an earlier head rendered all three stories in both directions with no applicable dimension — reported (the author's run; the detectors' conditions match nothing in those stories).
  • The scoped audit with this entry reports the stated counts and verified N/A — reported (the author's run; CI does not run the RTL audit on this draft).
  • A labelled RTL run here would be the full nine-leg audit, because the registry is shared routing policy — verified (the scope classifier names both changed files; CI counts nine legs for that label).
  • Main's next full RTL audit confirms it after merge — reported (a plan; the full audit runs on main after merges).
  • Duplicate test red first: a second copy of the last entry fails and names VisuallyHidden; the real registry passes — verified (re-run).
  • The coverage test file passes with 82 tests, as do the audit-scope and a11y-scope tests, and prettier is clean — reported (not re-run; 82 matches the cases in the file).
  • Scope: the RTL audit registry only — verified (the registry and its own check).
  • #5885 also adds a VisuallyHidden entry — verified.
  • #5885's VisuallyHidden.tsx receipt predates the current file — verified (it matches the file as it was in August).
  • The registry had no duplicate check — verified (none on the base).
  • Only one entry may land, and the new test makes the second fail loudly — verified (every scoped Node test run includes the test, and it fails on a repeated name).
  • #5885 drops its VisuallyHidden entry when it next merges main — reported (a plan for another pull request, which still carries the entry).
  • The other listed pull requests add entries for other components — false (see the finding above).

Files:

  • .github/scripts/rtl-audit-coverage.test.mjs — clear: the new block checks the same lowercased key the rollup uses and runs in CI.
  • apps/storybook/rtl-audit/verified-not-applicable.json — clear: one well-formed entry, consistent with the file's convention, which the new check passes.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. CI, which started when the pull request was marked ready, passes on this head with nothing failing, including the new duplicate check. The VisuallyHidden entry holds up under the RTL audit-evidence record, and the Overlap list still matches how each listed pull request changes verified-not-applicable.json. One optional note: nothing reads the new entry's sha256 receipts, so a later edit to VisuallyHidden.tsx will not stale the entry on its own.

Claims and files checked

Review mode: same-head; reason: none

Claims:

  • Test-only RTL audit coverage change — verified (one CI test and the Storybook-app registry; no published package changes).
  • VisuallyHidden's case was first written up in #5885 — verified (#5885 carries an earlier VisuallyHidden entry).
  • The registry gets a check that each component is declared once, case-insensitively — verified (the new test lowercases each name; it fails on a repeated entry and on a case variant).
  • The coverage rollup keys declarations by component, so a second entry would silently replace the first — verified (the rollup's map keeps the later reason, and no other check rejects a repeat).
  • The audit reports VisuallyHidden as verified N/A instead of a coverage gap — verified (the rollup returns a coverage gap on the base registry and verified N/A on this one).
  • No product change — verified (the registry's only readers are the audit harness, its scope classifier and tests).
  • The touched-components check and the release check stop flagging VisuallyHidden, and that mark meant all-N/A with no reason, not an RTL failure — verified (the touched-components cell becomes “no RTL check applies”, not a pass, and the release check's coverage table drops its gap row).
  • The reason: one clipped 1px element pinned with logical insets, with no glyph, decoration, pointer input, order, scroll, drag, overlay or keyboard behavior — verified against the component source.
  • sha256 receipts for the story, the component and its index at the base — verified (all three match at the base, this head and main).
  • The governing record admits a reason-backed verified N/A, and an applicable dimension makes the entry stale and fails the audit — verified (record text; the rollup returns stale with one applicable dimension, and stale sets a failing exit).
  • The clip block's properties, with no physical inline property — verified against the component source (its one margin is a symmetric shorthand).
  • The touched-components audit on an earlier head rendered all three stories in both directions with no applicable dimension — reported (the author's run; the detectors' conditions match nothing in those stories).
  • The scoped audit with this entry reports the stated counts and verified N/A — reported (the author's run; this pull request's default check audits no component).
  • A labelled RTL run here would be the full nine-leg audit, because the registry is shared routing policy — verified (the scope classifier names both changed files; CI counts nine legs for that label).
  • Main's next full RTL audit confirms it after merge — reported (a plan; the full audit runs on main after merges).
  • Duplicate test red first: a second copy of the last entry fails and names VisuallyHidden, and the real registry passes — verified (red run on this head's code; green in CI).
  • The coverage test file passes with 82 tests, as do the audit-scope and a11y-scope tests, and prettier is clean — verified (CI at this head: 82 tests in that file, the audit-scope and a11y-scope test files pass, and the lint job's Prettier check over changed files passes).
  • Scope: the RTL audit registry only — verified (the registry and its own check).
  • #5885 adds 94 entries, including VisuallyHidden — verified (94 new entries against its merge base).
  • #5885's VisuallyHidden receipt predates the current component file — verified (it matches the file as it was in August).
  • The new duplicate test fails CI if both VisuallyHidden entries ever land — verified (CI's test-node runs the test, and it fails on a repeated name).
  • Six listed pull requests add entries for other components: CircleCheckIndicator; LineChart, AreaChart and Sparkline; the three check indicators; SegmentedControl — verified (each diff adds only those entries).
  • Two rename an entry from lab to core, ListInput and CommentPin — verified.
  • Two remove an entry, Section and RichTextView — verified.
  • One leaves the registry unchanged — verified.
  • None but #5885 touches VisuallyHidden; whichever lands second merges the array — verified for the first part (no other registry diff names it, and none changes its files); the second is a merge note.
  • Owner and land path — reported (the land path still says draft; the pull request is now ready for review).

Files:

  • .github/scripts/rtl-audit-coverage.test.mjs — clear: the new block checks the same lowercased key the rollup uses and passes in CI.
  • apps/storybook/rtl-audit/verified-not-applicable.json — clear: one well-formed entry, consistent with the file's convention, which the new check passes.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 27, 2026 16:51
@cixzhang
cixzhang merged commit 9984180 into main Nov 27, 2026
156 checks passed
@github-actions
github-actions Bot deleted the test/rtl-visually-hidden-verified-na branch November 28, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — 2d4a55c0 Deployed Nov 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. lane:1 Astryx fix-loop lane 1 owns this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant