Repository navigation
test(rtl): enforce native touch target dimensions and remove centering exemption - #7848
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Visual Regression55 of 502 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 35 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
This looks ready to approve: D7 now fails a native input below the target's 24×24 minimum (23×24, 24×23 and 20×20 inputs pass on the base audit and fail with this change), keeps its centering and hit checks, and CheckboxInput, RadioList and Switch still pass D7 on the built Storybook in CI. The three components also lint cleanly without the allowLogicalCentering exemption. The remaining step is an engineering owner's approval of the rtl-audit-evidence record edit, which the spec-owner check is waiting on.
[Automated review]
9e7f43f to
706a76e
Compare
There was a problem hiding this comment.
This looks ready to approve: D7 now fails a native input below its target's 24×24 minimum (23×24, 24×23 and 20×20 inputs pass the base audit and fail with this change) while keeping its centering and hit checks, and the real CheckboxInput, RadioList and Switch inputs still measure at least 24×24 in both directions. The three components also lint cleanly without the allowLogicalCentering exemption. What remains is an engineering owner's approval of the rtl-audit-evidence record edit, which the spec-owner check is waiting on, and a green CI run on this head.
[Automated review]
|
/approve-spec 706a76e |
Rebased validation — 2026-10-27
Rebased onto main
ad427c274995826177dd851d8a798c18391da161; head is706a76e5931534a23a841cdddfcf806d8b4e2ab2. No conflicts.git range-diffreports the same focused patch: 9 files, 260 additions, 90 deletions. No component or product behavior changes were added during the rebase.Fresh local validation on the rebased head:
pnpm check:repo, lint of the three formerly exempt components, and diff whitespace checks passed. Lint retains one existing unused-import warning in Switch.testingauthority route was reevaluated against the new base/head. The matched records and claims are unchanged:architecture:rtl-audit-evidenceINV1–INV4, INV6, INV9/INV10, INV12–INV14, INV16;architecture:component-test-sufficiencyINV1–INV7, INV10/INV11; AST-030 FR7/FR11.Fresh GitHub CI must rerun on this head; previous green CI and approval receipts below belong to the original head. Engineering-owner approval is still required for the architecture record. No merge or auto-merge is requested.
Maintainer impact
The three coarse-pointer controls already use
rtlStyles.centerInline()and keep their native inputs at least 24px in each dimension, but their obsolete lint exemption still permits unsafe logical centering to return. D7 also reports a centered, hittable input as passing even when its native box has shrunk below that minimum. A green audit can therefore miss a smaller touch target.Intended invariant
architecture:rtl-audit-evidenceINV9/INV10: prove the gate with mutations; measure native target size as well as alignment.design:bidirectionalityDR8/DR12: retain the same centered, adequately sized target in LTR and RTL.Change
allowLogicalCenteringoption/schema branch, and its exemption-only tests. Keep all physical-property and unsafe-centering diagnostics; assert the rule has no options.minimumTargetSize, while retaining center-point hit testing and the existing alignment tolerance.Overlap check
Open #7489 changes D1 fixture selection in the same runner/README; #5885 changes N/A evidence admission/coverage. Neither changes D7 or the removed lint option. This PR leaves those mechanisms and their unresolved decisions alone. No open PR was found for
allowLogicalCenteringor D7. The current records were checked on baseb0981237c0440a680a33580f7a99fa85b2f05bbd.Evidence
Failure before the change: the new 23×24, 24×23, and 20×20 native-input regression cases all fail against the pinned base D7 implementation: each expects audit exit 1 but receives exit 0. Each fixture has a 64×64px wrapper, so it cannot pass by measuring only the wrapper.
Success after the change: all nine Chromium tests pass. The exact 24×24 boundary passes; independent width/height reductions fail while centering and center hits remain true; displaced and occluded inputs still fail; invalid/missing minima are errors. Every geometry case exercises CheckboxInput, RadioList, and Switch routes in LTR/RTL at sm/md.
Real built Storybook mutation: shrink only the native checkbox/radio inputs to 20×20px, suppressing their CSS minimums without moving their centers. The base runner passes all three D7 targets (exit 0). The changed runner fails all three (exit 1), retaining
hit=true,centered=true, andsize=false. Restore the untouched built Storybook: all three pass (exit 0).Restored native dimensions are identical in LTR and RTL:
Product/runtime behavior verified unchanged: no component source, public types, styles, stories, or callbacks changed. The full scoped built-Storybook audit completes 3/3 D1 and 58/58 D5/D6 scans with exact planned/completed identities, all curated D2/D4/D7 checks passing, 3 measured components, and no failures/gaps/stale evidence. Existing component tests pass 159/159.
Repeat the red/green browser test
After
pnpm install --frozen-lockfileandpnpm exec playwright install chromium:Review receipt
The
testingtrigger was routed against the pinned base to head9e7f43f3611bc06a9ca87162485fb7d9584d9d00. It matchesarchitecture:rtl-audit-evidenceINV1–INV4, INV6, INV9/INV10, INV12–INV14, INV16;architecture:component-test-sufficiencyINV1–INV7, INV10/INV11; and AST-030 FR7/FR11. The direct RTL evidence owner supplies this change's size/mutation obligations. Component-test sufficiency does not introduce a component API change; the new tests observe the previously unmeasured native-size outcome. AST-030 is preserved by using the existing RTL owner and retaining check names. D1 applicability/exclusion claims are unchanged.Independent read-only review found no actionable defects and confirmed the regression, existing component checks, and restored lint enforcement. CI wiring was inspected, not run end to end.
Scope
Testing
pnpm buildandpnpm -F @astryxdesign/storybook build— passed.--filter CheckboxInput,RadioList,Switch --concurrency 2) — passed, exit 0.node internal/eslint-plugin-astryx/no-physical-properties.test.mjsandprefer-center-inline.test.mjs— passed.pnpm -F @astryxdesign/storybook typecheck— passed.pnpm check:repoandpnpm check:knowledge— passed.eslint.config.jshas the same three unrelated pre-existing formatting differences as the pinned base; they are left untouched.node --check apps/storybook/rtl-audit/rtl-audit.mjsandgit diff --check— passed.9e7f43f3611bc06a9ca87162485fb7d9584d9d00: test, build, lint, typecheck, Storybook, and pr-rtl passed before publication. Code review and owner approval remain separate.No changeset: only repository lint/audit infrastructure and its documentation change.
Writing rubric results
R1 narration: removed the stale D7 size-enforcement gap and described the measured native dimensions in present tense; unrelated planned D1/N/A implementation descriptions remain scoped to their existing owners.
R2 research: mutation runs and results stay in this PR, not the architecture record.
R3 evidence: INV10 names native width/height mutation fixtures and the browser test path, not a PR or commit.
R4 rejected alternatives: no new alternatives or decisions added.
R5 change references: no PR/issue references added to the record.
R6 open questions: N/A admission, historical debt, and required-check rollout remain unanswered and unchanged.