Skip to content

test(List): measure the label instead of a hidden tooltip description - #13726

Merged
cixzhang merged 1 commit into
mainfrom
test/listmarkers-visible-span
Nov 24, 2026
Merged

cixzhang merged 1 commit into
mainfrom
test/listmarkers-visible-span

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Who this helps

Everyone landing on main. Since 2bfebe7 (#11916), four ListMarkers.a11y.chromium.spec.ts cases fail on main: core-list--numbered-first-line: shared counter column at 1280px light ltr/rtl and at 390px dark ltr/rtl. Each reports Expected: <= 1; Received: 34 at the first-line alignment assertion.

This re-cuts astracat-bot's #13725, crediting it. The commit is that change byte for byte.

Intended invariant

The counter stays aligned with the first line of the visible label. Item's FR2 first-line alignment contract does not change, and neither do the one-pixel bound or any other assertion.

Change

The selector :scope > span > span now finds the Avatar's hidden tooltip-description span in the start-content slot before it reaches the row label. That span has no line box, so the measurement reads 34px. The selector now skips [hidden] candidates (:scope > span > span:not([hidden])), so it measures the row label again.

Test-only. It changes only what the browser test observes: no List, Item, Avatar or Tooltip code, styles or story fixtures, and no timeout, retry, skip, baseline or assertion limit.

Evidence

  • Red, reproduced: CodeBunny's CI lab ran the unchanged spec at the failing commit 20 times (repro 7632199019499071527). All four affected cases failed with the same 34px reading in all 20 runs, and the file's 13 other active cases passed. main shows the same four failures since 2bfebe7.
  • Green: this pull request's own CI run of the accessibility contracts (Chromium) is the browser proof. I can't run browsers on my build box.
  • Quick preflight: passes, typecheck included, on a Linux build box.

Tests covered

packages/core/src/List/ListMarkers.a11y.chromium.spec.ts: the four core-list--numbered-first-line: shared counter column cases (1280px light ltr and rtl; 390px dark ltr and rtl).

Overlap checked: #13725 (this is its Rule C re-cut: the commit is #13725 byte for byte, credited to it; PR Review closes #13725 in favour of this one.)

CI impact

CI impact: none. One selector in one browser test. Repository tooling only: no Changeset.

Co-authored-by: astracat-bot[bot] (the commit is its change, byte for byte).

Owning session: noopbot (a61f66c2), under CI & Release (ca77f950). Land path: the drain's serial merge loop, on green, CodeBunny approval and Specs' exact-head /approve-spec.

Since 2bfebe7 the four 'core-list--numbered-first-line: shared counter column' cases read the Avatar's hidden tooltip-description span through ':scope > span > span'. That span has no line box, so the first-line alignment check read 34px. The selector now skips [hidden] candidates and measures the row label again. Test-only: no component, style, story, assertion or limit changes.

Co-authored-by: astracat-bot[bot] <astracat-bot[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Nov 24, 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 24, 2026 1:34pm UTC

Request Review

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

astracat-bot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 24, 2026, 1:41 PM UTC

@cixzhang cixzhang added the ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) label Nov 24, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec b2e0a08

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · b2e0a08

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
List 19.7 kB (0) · 810 B CSS (0) — ✓ · ✓ · —
ListItem 83.9 kB (0) · 12.8 kB CSS (0) — ✓ · ✓ · ✓

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

Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-rtl for RTL.


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: this pull request is a draft, so CI has not run on this head yet. Marking it ready starts CI, and the four core-list--numbered-first-line cases need to pass in the Chromium accessibility contracts before merge.

The :not([hidden]) filter lets the first-line check pass over the hidden tooltip description that Avatar's name tooltip renders in the row's start slot, so it measures the row label again, with no component, story or assertion change.

Claims and files checked

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

  • Claim: the old query matches the Avatar's hidden tooltip description before the row label: verified (Item.tsx:935-942 start slot precedes the label container at Item.tsx:991-1000; Avatar.tsx:957-962 and useLayer.tsx:1218-1220 render the hidden copy in that slot).
  • Claim: that span has no line box: verified (it carries the hidden attribute, useTooltip.tsx:324 and :334).
  • Claim: skipping [hidden] measures the row label again: verified (the next match is the label span, Item.tsx:863).
  • Claim: test-only, with no component, style, story, timeout, retry, skip, baseline or assertion-limit change: verified (one file; ListMarkers.a11y.chromium.spec.ts:260-267 unchanged).
  • Claim: the commit is the earlier bot pull request's change byte for byte, and that pull request is closed in favour of this one: verified (identical diff on the same base; the earlier pull request is closed unmerged).
  • Claim: the four cases fail on main with a 34 px reading, reproduced in 20 runs: not independently checkable here; consistent with the code path above.
  • Claim: this pull request's CI run is the browser proof: pending, since CI has not run on this head.
  • Claim: a quick preflight with typecheck passes: not re-run here.
  • Claim: no CI impact and no changeset needed: verified (no workflow or published file changes).
  • Claim: the land path needs an exact-head spec approval: present.
  • File: packages/core/src/List/ListMarkers.a11y.chromium.spec.ts: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 24, 2026 14:08
@cixzhang
cixzhang merged commit 40ccf52 into main Nov 24, 2026
155 checks passed
@github-actions
github-actions Bot deleted the test/listmarkers-visible-span branch November 25, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — b2e0a088 Deployed Nov 24, 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-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) 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.

1 participant