Skip to content

test(InfoTip): the audit reads a hit area only where its layer draws one - #10050

Merged
cixzhang merged 2 commits into
meta:mainfrom
vjeux:test-infotip-audit-fine-pointer
Nov 5, 2026
Merged

cixzhang merged 2 commits into
meta:mainfrom
vjeux:test-infotip-audit-fine-pointer

Conversation

@vjeux

@vjeux vjeux commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Maintainer impact

The release check on main fails "Accessibility spec-test contracts": all 17 InfoTip audit cases stop at InfoTipAudit.a11y.chromium.spec.ts:444, "button 0 (sm) grows under a fine pointer: auto auto auto auto". It started when #8085 merged, right after the audit landed in #9940; main just before #8085 passes all 17.

Intended invariant

component:InfoTip AR1: under a coarse pointer the button reaches 44 px through an invisible hit area; under a fine pointer the button keeps its own box (spec:AST-094 FR42). The audit checks that the hit area does not grow under a fine pointer.

Change

The audit read the button's ::after insets and required each to be 0. That fit InfoTip's earlier hit area, which set the insets for every pointer. Since #8085, InfoTip uses the shared touch layer, which gives the ::after its content, position and insets only under a coarse pointer. Under a fine pointer the ::after has no content, so it draws no box: there is no hit area, and its insets read auto. The audit now reads the insets only where the ::after has content, and still requires 0 there. The product is unchanged.

Why the audit and not the product: auto here belongs to a pseudo-element that draws no box, so no user can reach it. Setting the insets to 0 would put back a box the layer does not draw, only for the audit to read.

Evidence

Chromium, the InfoTip Sizes story, main e657e2e against main before #8085 (38f1a1d):

  • Under a fine pointer on main, each button's ::after reads content none, position static, insets auto, and a point 3 px outside each edge hits the page, not the button. Before feat(List): a row's touch target grows toward 44 px where its neighbors leave room #8085 it read content "", position absolute, insets 0px, with the same hits. Under a coarse pointer both read the same band (for the sm button: -14 px, -8 px, -14 px, -14 px), and points 3 px out hit the button.
  • Failure before the change: main fails 17 of 17 cases with "auto auto auto auto"; main before feat(List): a row's touch target grows toward 44 px where its neighbors leave room #8085 passes 17 of 17.
  • Success after the change: 17 of 17 pass.
  • A hit area that grows still fails: with InfoTip's ::after grown 4 px under every pointer, all 17 fail with "-4px -4px -4px -4px".
  • Product/runtime behavior verified unchanged: the diff is one test file.
  • CI impact: none; no workflow or CI script changes.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

pnpm --filter storybook build
git rev-parse HEAD > apps/storybook/dist/astryx-build-sha.txt
npx playwright test -c playwright.config.ts --project=chromium \
  packages/core/src/InfoTip/__tests__/InfoTipAudit.a11y.chromium.spec.ts

The grown hit area, as a commit not for landing: 2bc67de.

The InfoTip audit read the button's ::after insets and required each to
be 0 under a fine pointer. InfoTip's hit area is now the shared touch
layer, which draws its ::after only under a coarse pointer. Under a
fine pointer the ::after has no content, so it draws no box, and its
insets read auto. The audit now reads the insets only where the ::after
draws a box, and still requires 0 there.
@vercel

vercel Bot commented Nov 5, 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 5, 2026 6:53am UTC

Request Review

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

astracat-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 5, 2026, 6:59 AM UTC

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · a9474ab

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
InfoTip · Storybook 38.3 kB (0) · 5.1 kB CSS (0) 148 (0) — · ✓ · —

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

API changes: none in this pull request

Committed API report behind this build: cli 9 rows, core 4 rows; run pnpm api:report.

Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@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 pending CI: CI has not run on this head yet.

The audit now skips the inset read only where the button's ::after draws no box and still fails a hit area that grows under a fine pointer, which matches component:InfoTip AR1 and spec:AST-094 FR42; InfoTip itself is unchanged.

Next step: mark the pull request ready for review, and a maintainer adds the ci:run label so CI runs (the label takes effect on the next push or a close and reopen).

[Automated review]

@vjeux
vjeux marked this pull request as ready for review November 5, 2026 06:14
@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 5, 2026
@cixzhang
cixzhang marked this pull request as draft November 5, 2026 06:18
@cixzhang
cixzhang marked this pull request as ready for review November 5, 2026 06:19
@cixzhang
cixzhang marked this pull request as draft November 5, 2026 06:47
@cixzhang
cixzhang marked this pull request as ready for review November 5, 2026 06:47

@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 pending CI: CI has not finished on this head yet.

The audit now skips the inset read only where the info button's ::after draws no box, and still fails a hit area that grows under a fine pointer, which matches component:InfoTip AR1 and spec:AST-094 FR42; InfoTip itself is unchanged.

[Automated review]

@cixzhang
cixzhang merged commit 4776d40 into meta:main Nov 5, 2026
78 of 118 checks passed
@vjeux
vjeux deleted the test-infotip-audit-fine-pointer branch November 5, 2026 07:30

This branch was successfully deployed

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

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants