Repository navigation
test(List): measure the label instead of a hidden tooltip description - #13726
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec b2e0a08 |
PR Analysis Report🔎 Preview ·
|
| 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
There was a problem hiding this comment.
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-942start slot precedes the label container atItem.tsx:991-1000;Avatar.tsx:957-962anduseLayer.tsx:1218-1220render the hidden copy in that slot). - Claim: that span has no line box: verified (it carries the
hiddenattribute,useTooltip.tsx:324and: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-267unchanged). - 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.
Who this helps
Everyone landing on
main. Since 2bfebe7 (#11916), fourListMarkers.a11y.chromium.spec.tscases fail onmain:core-list--numbered-first-line: shared counter columnat 1280px light ltr/rtl and at 390px dark ltr/rtl. Each reportsExpected: <= 1; Received: 34at 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 > spannow 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
mainshows the same four failures since 2bfebe7.Tests covered
packages/core/src/List/ListMarkers.a11y.chromium.spec.ts: the fourcore-list--numbered-first-line: shared counter columncases (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.