Skip to content

fix(Thumbnail): focusing Open shows one ring, not two - #11613

Merged
cixzhang merged 6 commits into
mainfrom
l0/thumbnail-one-focus-ring
Nov 17, 2026
Merged

cixzhang merged 6 commits into
mainfrom
l0/thumbnail-one-focus-ring

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

User impact

  • Who: keyboard users of a Thumbnail that has Open (onClick).
  • Before: focusing Open drew two rings: the button's own ring inside the image container's ring.
  • After: focusing Open shows one ring, on the image container.
  • Unchanged here: focusing Remove still draws two rings (Remove's own, and the container's), as on main. Remove's own ring can sit on the photo at about 1:1, so the container ring stays until the look of a ring over images is decided. The record keeps that as a narrower FR4 gap.

Fixes the Open part of the Thumbnail item in #8850. Selector was fixed by #8874. Item, Token and the cards are in #8869 and #8872.

What changed

  • Thumbnail.tsx: Open uses focusOutlineProps.suppressed, so it draws no ring of its own inside the container's focusWithin ring. The container ring is unchanged.
  • component:Thumbnail record: FR4 states that Open draws no ring of its own. The FR4 implementation gap and its Current-state impact bullet now name Remove only (six gaps remain). The verification map and verified_by name the shared focus-ring browser spec.
  • Story ClickableWithRemove (Open and Remove together), used by the browser spec.
  • [fix] changeset.

Evidence

  • Thumbnail.test.tsx "draws no ring of its own on Open, inside the image container ring" reads the injected style rules: every rule that sets Open's outline-style with no focus condition sets none. On main it fails, because Open keeps its own ring.
  • FocusRingOwner.a11y.chromium.spec.ts gains a Thumbnail case at 1280 and 390 px: with Open focused, the shared ringedElements helper counts every ring on the page and expects exactly one. It runs on CI's Chromium leg.
  • architecture:interaction-modality INV3 (current) decides the behavior: one focus move has one owning indicator. No API change.

Stills

Real Chrome (Chrome for Testing 149, device pixel ratio 2), keyboard focus with Tab. Before: main 90abc74. After: Open as rendered by this change. The Remove stop matches main again, so its "before" frames show what it still draws. The photo service timed out, so the thumbnails show their empty placeholder; the rings are unaffected.

Light, LTR Dark, LTR Light, RTL 390 px, light
Before, Open (two rings) before open light-ltr before open dark-ltr before open light-rtl before open 390-light-ltr
After, Open (one ring, on the image) after open light-ltr after open dark-ltr after open light-rtl after open 390-light-ltr
Remove (unchanged, two rings as on main) remove light-ltr remove dark-ltr remove light-rtl remove 390-light-ltr

Writing rubric results

Record touched: component:Thumbnail (FR4, the Openable state row, the FR4 verification row, verified_by, the Current-state impact bullet).

  • R1 narration: none. FR4 and the Openable row state what the container and Open do.
  • R2 research: none.
  • R3 evidence: the FR4 verification cell names the browser spec and what fails, not a pull request.
  • R4 rejected alternatives: none added.
  • R5 change references: none.
  • R6 open questions: none touched.
  • R7 project status: none added. The gap count stays six; the FR4 gap is narrowed to Remove.

Scope

  • Thumbnail, its story, tests, record and a changeset only.
  • Public text contains no internal context.

Owner: Astryx fix-loop lane 0. Land path: CodeBunny approval of the exact head, Specs stamp, CI, then the merge queue.

The image container rang on any focused descendant, so focusing the
remove button drew a second ring around the image, and Open drew its own
ring inside the container's. The container now rings only for Open, its
first child, and Open draws no ring of its own.
@vercel

vercel Bot commented Nov 13, 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 15, 2026 10:51am UTC

Request Review

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

astracat-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 15, 2026, 10:58 AM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 13, 2026
@cixzhang cixzhang added the ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) label Nov 13, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 06bf329

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 8d3d79d

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
lab/Comments 369.5 kB (+23 B) · 2.5 kB CSS (0) — — · — · —
lab/CommentThread 362.4 kB (+22 B) · 2.4 kB CSS (0) — — · — · —
Thumbnail · Storybook 69.2 kB (+17 B) · 12.3 kB CSS (0) 370 (0) ✓ · ✓ · ✓

Package size: @astryxdesign/core 7.60 MB packed (+70 B); no new dependencies.

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

Accessibility: 1 violation(s)

Accessibility Audit

Status: 1 accessibility violation(s) found — 1 serious.

Thumbnail - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 1/13 stories · Learn more
    • WCAG: 1.4.3 (Level AA)

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.

Requesting changes: the one-ring behavior is right in Chromium on this head, but the ring mechanism, the new browser spec's coverage claim and the record write-up each need a fix.

  • Thumbnail.tsx rings the image container with the positional focusWithinFirstChild condition, while architecture:interaction-modality INV3 requires a wrapper that rings for one primary control to take the shared focusWithinOwner style with focusOwnerProps on that control, as Selector and the sibling Item, Token and card fixes do.
  • ThumbnailFocusRing.a11y.chromium.spec.ts reads outlines only on the focused element and its ancestors below the group, so it still passes when the group or a sibling also rings, which makes the FR4 verification row's claim that it fails on a ring "anywhere but the container or the remove button" untrue; asserting the shared ringedElements helper at each stop fixes both.
  • Miss: this pull request changes the component:Thumbnail record, but its description has no ## Writing rubric results section, which the knowledge-record rules require for any record change.

Swapping in focusWithinOwner renders exactly the same rings at every stop; the new unit test then needs to look for the owner selector instead of :first-child. Remove's ring is now its only indicator, and the image container's clipping trims 1px from its top and end edges, which is worth a look but not blocking.

Claims and files checked
  • Claim: before, focusing Remove drew its own ring and a ring around the whole image: verified in Chromium on the base.
  • Claim: before, focusing Open drew the button's own ring inside the container's: verified in Chromium on the base (the browser's default ring).
  • Claim: after, each focus move shows one ring, with Open ringing the container and Remove ringing itself: verified in Chromium on the head, with and without Open.
  • Claim: this fixes the Thumbnail part of the two-rings issue, Selector was fixed earlier, and the other components are in two open pull requests: verified.
  • Claim: the container now rings only for Open, its first child, as SideNavItem does: verified in Thumbnail.tsx, but INV3 lists that pattern as a gap (finding above).
  • Claim: Open draws no ring of its own: verified in Thumbnail.tsx.
  • Claim: FR4 now states the one-ring behavior, its gap and Current-state bullet are removed, and five gaps remain: verified in Thumbnail.spec.md.
  • Claim: the verification map names the new browser spec: verified, but its failure expectation is broader than the spec (finding above).
  • Claim: a new story with Open and Remove backs the browser spec: verified.
  • Claim: a [fix] changeset is included: verified.
  • Claim: the new unit test fails on main, also fails with the container fixed but Open not suppressed, and passes here with the suite at 33 of 33: verified by running it on the base and the head; the middle case follows from its at-rest outline assertion.
  • Claim: the browser spec checks that Tab to Open rings only the container and Tab to Remove only the button: false as stated; its logic fails on main and passes here, but it reads only the focused element's ancestors (finding above).
  • Claim: the browser spec runs on CI's Chromium leg: its file name and scope line route it there, but CI has not run on this head yet.
  • Claim: INV3 decides the behavior and there is no API change: behavior verified and the built API surface is unchanged; INV3 also decides the mechanism (finding above).
  • Claim: the scope is Thumbnail, its story, tests, record and a changeset, and public text has no internal context: verified.
  • Claim: the land path is an approval of the exact head, the spec stamp, CI and the merge queue: a process note, consistent with the spec approval recorded at this head.
  • Changeset: focusing Remove rings only that button and focusing Open rings only the image container, one ring instead of two: verified.
  • File .changeset/thumbnail-one-focus-ring.md: clear.
  • File apps/storybook/stories/Thumbnail.stories.tsx: clear.
  • File docs/specs/components/Thumbnail/Thumbnail.spec.md: the FR4 verification row overclaims the browser spec, and the change has no rubric results in the description.
  • File packages/core/src/Thumbnail/Thumbnail.test.tsx: clear; it needs the owner selector once the mechanism changes.
  • File packages/core/src/Thumbnail/Thumbnail.tsx: positional ring condition instead of the shared focus-owner style.
  • File packages/core/src/Thumbnail/__tests__/ThumbnailFocusRing.a11y.chromium.spec.ts: an ancestor-only copy of the shared ring helper.

Automated review (maintainer link)

The image container takes focusWithinOwner and Open takes
focusOwnerProps, as INV3 requires for a wrapper that rings for one
primary control. The browser case moves into FocusRingOwner, which
counts every ring on the page at each tab stop. INV3 no longer lists
Thumbnail as a gap.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 14, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 36e6e1f

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 14, 2026

@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.

Requesting changes: Thumbnail now shows one focus ring per focus move through the shared focus-owner style, and the earlier ring-mechanism and browser-spec findings are fixed; one description item remains.

  • This pull request changes the component:Thumbnail and architecture:interaction-modality records, but its description has no ## Writing rubric results section, which the knowledge-record rules require for any record change.

Two small non-blocking touch-ups: the FocusRingOwner.a11y.chromium.spec.ts header still describes only Selector, and the INV3 verification row in interaction-modality.md still says that spec covers the shared module in Selector only. Remove's ring, now its only indicator, loses 1px on its top and inline-end edges to the image container's clipping, as it did before; worth a look, not blocking.

Claims and files checked
  • Claim: before the change, focusing Remove or Open drew two rings: verified (computed outlines in Chromium on the base).
  • Claim: after the change, each focus move shows one ring, Open ringing the image container and Remove only itself: verified (Chromium on the head, also for a Thumbnail with Remove only).
  • Claim: this fixes the Thumbnail part of #8850, with Selector fixed by #8874 and Item, Token and the cards in #8869 and #8872: verified (#8850 open and names Thumbnail; #8874 merged; #8869 and #8872 open).
  • Claim: the container takes the shared focus-owner ring and Open carries the owner attribute: verified (Thumbnail.tsx:520, :531).
  • Claim: Open's own ring is suppressed: verified (Thumbnail.tsx:532).
  • Claim: FR4 states the one-ring behavior, its gap and impact bullet are removed, five gaps remain, and the verification map names the shared browser spec: verified (Thumbnail.spec.md:130, :224, five impact bullets).
  • Claim: Thumbnail leaves INV3's list of wrappers that write their own ring conditions: verified (interaction-modality.md:158).
  • Claim: the new ClickableWithRemove story is the one the browser spec uses: verified (Thumbnail.stories.tsx:153, spec :85).
  • Claim: a fix changeset is added: verified (.changeset/thumbnail-one-focus-ring.md).
  • Claim: the new unit test fails on main and passes here: verified (fails on the base, passes on the head, 33 of 33).
  • Claim: the shared browser spec gains a Thumbnail case at 1280 and 390 px that counts every ring at each stop and expects one: verified (FocusRingOwner.a11y.chromium.spec.ts:81-91, focusRings.ts:26).
  • Claim: no API change: verified (built public surface identical at base and head).
  • Claim: the scope is Thumbnail, its story, tests, record and a changeset, with no internal context: verified (the one other record edit is Thumbnail's own INV3 gap entry, which the description lists).
  • Changeset: focusing Remove rings only that button and focusing Open rings only the image container: verified (Chromium on the head).
  • File .changeset/thumbnail-one-focus-ring.md: clear.
  • File apps/storybook/stories/Thumbnail.stories.tsx: clear.
  • File docs/architecture/interaction-modality.md: non-blocking note (INV3 verification row).
  • File docs/specs/components/Thumbnail/Thumbnail.spec.md: clear.
  • File packages/core/src/Thumbnail/Thumbnail.test.tsx: clear.
  • File packages/core/src/Thumbnail/Thumbnail.tsx: clear.
  • File packages/core/src/__tests__/FocusRingOwner.a11y.chromium.spec.ts: non-blocking note (file header).

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, with CI still to go green: CI finished on this head with one failure. The first Node test shard stopped at its job time limit while running CLI tests this change does not touch, with no failing test, so it needs a re-run before merge.

Thumbnail now shows one focus ring per focus move through the shared focus-owner style, and the record edits match the code. Not blocking: the INV3 verification row in interaction-modality.md and the header of FocusRingOwner.a11y.chromium.spec.ts still describe only Selector, so naming Thumbnail there would keep them accurate.

Claims and files checked
  • Claim: before the change, focusing Remove drew two rings, and so did focusing Open: verified (Chromium on the base: the container ring plus Remove's ring, or plus Open's browser ring).
  • Claim: after the change, each focus move shows one ring, with Open ringing the image container and Remove ringing only itself: verified (Chromium on the head, in light, dark and right-to-left, and with Open and Remove together).
  • Claim: the affected users are keyboard users of a Thumbnail with both Open and Remove: verified, though narrower than the change, which also gives Open-only and Remove-only thumbnails one ring.
  • Claim: this fixes the Thumbnail part of #8850, Selector was fixed by #8874, and Item, Token and the cards are in #8869 and #8872: verified (#8850 is open and names Thumbnail with Remove; #8874 is merged; #8869 and #8872 are open).
  • Claim: the image container takes the shared focus-owner ring instead of the any-focus ring, and Open carries the owner mark: verified (Thumbnail.tsx:520, :531).
  • Claim: Open draws no ring of its own: verified (Thumbnail.tsx:532; the new unit test fails when that reset is removed).
  • Claim: the Thumbnail record states the one-ring behavior, drops its gap and impact bullet with five gaps left, and its verification map names the shared browser spec: verified (Thumbnail.spec.md:130, :151, :224; five Current-state impact bullets).
  • Claim: Thumbnail leaves the list of wrappers that write their own ring conditions: verified (interaction-modality.md:158-159).
  • Claim: the new ClickableWithRemove story is the one the browser spec uses: verified (Thumbnail.stories.tsx:153; spec :85).
  • Claim: a fix changeset is added: verified (.changeset/thumbnail-one-focus-ring.md).
  • Claim: the new unit test fails on main, because the container's ring rule matches any focused descendant, and passes here: verified (it fails on the base at exactly that rule; 33 of 33 Thumbnail tests pass on the head).
  • Claim: the shared browser spec gains a Thumbnail case at 1280 and 390 px that counts every ring at each stop, expects one, and runs on CI's Chromium leg: verified (FocusRingOwner.a11y.chromium.spec.ts:81-91; both cases pass in CI on this head).
  • Claim: the one-ring rule decides the behavior, and there is no API change: verified (the built public surface of Core and the themes is identical at base and head).
  • Claim: the stills show the base and the first head in real Chrome and also hold for this head: partly verified (the referenced commit holds 16 images for those revisions; fresh Chromium frames of this head show the same one-ring result).
  • Claim: writing rubric results R1 to R7 for both records: verified (present tense, with no research, change references, rejected alternatives, open questions or new status lines; five gaps listed).
  • Claim: the scope is Thumbnail, its story, tests, records and a changeset, with no internal context: verified (the shared record and browser spec edits are Thumbnail's own entries).
  • Changeset: focusing Remove rings only that button, focusing Open rings only the image container, and each focus move shows one ring instead of two: verified (Chromium on base and head).
  • File .changeset/thumbnail-one-focus-ring.md: clear.
  • File apps/storybook/stories/Thumbnail.stories.tsx: clear.
  • File docs/architecture/interaction-modality.md: non-blocking note (verification row).
  • File docs/specs/components/Thumbnail/Thumbnail.spec.md: clear.
  • File packages/core/src/Thumbnail/Thumbnail.test.tsx: clear.
  • File packages/core/src/Thumbnail/Thumbnail.tsx: clear.
  • File packages/core/src/__tests__/FocusRingOwner.a11y.chromium.spec.ts: non-blocking note (file header).

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 14, 2026 01:23
@cixzhang
cixzhang marked this pull request as draft November 14, 2026 08:57
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec c4a3725

@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 because the pull request is still a draft, so it needs to be marked ready for review and pass CI before it merges.

Thumbnail now shows one focus ring per focus move through the shared focus-owner style, and the record edits match the code. Not blocking: the INV3 verification row in interaction-modality.md and the @input/@output header of FocusRingOwner.a11y.chromium.spec.ts still describe only Selector, so naming Thumbnail there would keep them accurate.

Claims and files checked
  • Claim: before the change, focusing Remove drew two rings, and so did focusing Open: verified (Chromium on the base: the container ring plus Remove's ring, or plus Open's browser ring).
  • Claim: after the change, each focus move shows one ring, with Open ringing the image container and Remove ringing only itself: verified (Chromium on the head, in light, dark and right-to-left, and with Open and Remove together).
  • Claim: the affected users are keyboard users of a Thumbnail with both Open and Remove: verified, though narrower than the change, which also gives Open-only and Remove-only thumbnails one ring.
  • Claim: this fixes the Thumbnail part of #8850, Selector was fixed by #8874, and Item, Token and the cards are in #8869 and #8872: verified (#8850 is open and names Thumbnail; #8874 is merged; #8869 and #8872 are open).
  • Claim: the image container takes the shared focus-owner ring instead of the any-focus ring, and Open carries the owner mark: verified (Thumbnail.tsx:520, :531).
  • Claim: Open draws no ring of its own: verified (Thumbnail.tsx:532; the new unit test fails when that reset is removed).
  • Claim: the Thumbnail record states the one-ring behavior, drops its gap and impact bullet with five gaps left, and its verification map names the shared browser spec: verified (Thumbnail.spec.md:130, :46, :224; five Current-state impact bullets).
  • Claim: Thumbnail leaves the list of wrappers that write their own ring conditions: verified (interaction-modality.md:158-159).
  • Claim: the new ClickableWithRemove story is the one the browser spec uses: verified (Thumbnail.stories.tsx:154; spec :85).
  • Claim: a fix changeset is added: verified (.changeset/thumbnail-one-focus-ring.md).
  • Claim: the new unit test fails on main, because the container's ring rule matches any focused descendant, and passes here: verified (it fails on the base at exactly that rule; 33 of 33 Thumbnail tests pass on the head).
  • Claim: the shared browser spec gains a Thumbnail case at 1280 and 390 px that counts every ring at each stop, expects one, and runs on CI's Chromium leg: verified in source (FocusRingOwner.a11y.chromium.spec.ts:81-91, using the shared ring helper over the story root); it has not run on this head yet.
  • Claim: the one-ring rule decides the behavior, and there is no API change: verified (the built public surface of Core and the themes is identical at base and head).
  • Claim: the stills show the base and earlier heads in real Chrome and also hold for a later head: partly verified (the stills were not opened; fresh Chromium frames of this head show the same one-ring result).
  • Claim: writing rubric results R1 to R7 for both records: verified (present tense, with no research, change references, rejected alternatives, open questions or new status lines; five gaps listed).
  • Claim: the scope is Thumbnail, its story, tests, records and a changeset, with no internal context: verified (the shared record and browser spec edits are Thumbnail's own entries).
  • Claim: the land path is an exact-head approval, the spec stamp, CI and the merge queue: consistent (the spec stamp succeeds at this head; CI has not run).
  • Changeset: focusing Remove rings only that button, focusing Open rings only the image container, and each focus move shows one ring instead of two: verified (Chromium on base and head).
  • File .changeset/thumbnail-one-focus-ring.md: clear.
  • File apps/storybook/stories/Thumbnail.stories.tsx: clear.
  • File docs/architecture/interaction-modality.md: non-blocking note (verification row).
  • File docs/specs/components/Thumbnail/Thumbnail.spec.md: clear.
  • File packages/core/src/Thumbnail/Thumbnail.test.tsx: clear.
  • File packages/core/src/Thumbnail/Thumbnail.tsx: clear.
  • File packages/core/src/__tests__/FocusRingOwner.a11y.chromium.spec.ts: non-blocking note (file header).

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 14, 2026 19:10

@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.

Requesting changes: Thumbnail now shows one ring per focus move, but at the Remove stop that one ring can be impossible to make out.

  • Miss: focusing Remove over a dark photo in the light theme, or a light photo in the dark theme, leaves no visible indicator, because the container no longer rings at that stop (Thumbnail.tsx:519-520) and Remove's own ring sits on the photo at 1.14:1 and 1.03:1; draw Remove's ring where it keeps 3:1 over any photo (for example an inset --color-on-dark ring on Remove's own scrim) and add a dark-photo and a light-photo contrast case to the browser spec.

The new Thumbnail cases in the Chromium focus-ring spec pass on this head, but they count outlines, so they pass on a ring that blends into the photo. Not blocking: the INV3 verification row in interaction-modality.md and the @input/@output header of FocusRingOwner.a11y.chromium.spec.ts still describe only Selector. The test-node (1/5) and pr-interaction (6/6) failures (a job time budget and an Item swipe timing check) do not touch Thumbnail, so a re-run should clear them.

Claims and files checked

Review mode: same-head; reason: none

  • Claim: before the change, focusing Remove drew two rings, and so did focusing Open: verified (Chromium on the base: the container ring plus Remove's ring, or plus Open's browser ring).
  • Claim: after the change, each focus move shows one ring, with Open ringing the image container and Remove ringing only itself: verified for the ring count (CI's Chromium spec and probes on the head); not true for what a person sees when the photo under Remove's ring is close to the ring colour (the blocking finding).
  • Claim: the affected users are keyboard users of a Thumbnail with both Open and Remove: narrower than the change, which also changes Open-only and Remove-only thumbnails.
  • Claim: this fixes the Thumbnail part of #8850, Selector was fixed by #8874, and Item, Token and the cards are in #8869 and #8872: verified (#8850 is open and names Thumbnail; #8874 is merged; #8869 and #8872 are open).
  • Claim: the image container takes the shared focus-owner ring instead of the any-focus ring, and Open carries the owner mark: verified (Thumbnail.tsx:520, :531).
  • Claim: Open draws no ring of its own: verified (Thumbnail.tsx:532; the new unit test fails when that reset is removed).
  • Claim: the Thumbnail record states the one-ring behavior, drops its gap and impact bullet with five gaps left, and its verification map names the shared browser spec: verified (Thumbnail.spec.md:130, :46, :224; five Current-state impact bullets).
  • Claim: Thumbnail leaves the list of wrappers that write their own ring conditions: verified (interaction-modality.md:158-159).
  • Claim: the new ClickableWithRemove story is the one the browser spec uses: verified (Thumbnail.stories.tsx:154; spec :85).
  • Claim: a fix changeset is added: verified (.changeset/thumbnail-one-focus-ring.md).
  • Claim: the new unit test fails on main, because the container ring rule matches any focused descendant, and passes here: verified (it fails on the base at exactly that rule; 33 of 33 Thumbnail tests pass on the head).
  • Claim: the shared browser spec gains a Thumbnail case at 1280 and 390 px that counts every ring at each stop, expects one, and runs on CI's Chromium leg: verified (both cases pass in CI on this head).
  • Claim: the one-ring rule decides the behavior, and there is no API change: verified (the generated public surface of every published package is unchanged).
  • Claim: the stills show the base and earlier heads in real Chrome and also hold for a later head: partly verified (the stills were not opened; fresh Chromium frames of this head show the same one-ring result).
  • Claim: writing rubric results R1 to R7 for both records: verified (present tense, with no research, change references, rejected alternatives, open questions or new status lines; five gaps listed).
  • Claim: the scope is Thumbnail, its story, tests, records and a changeset, with no internal context: verified.
  • Claim: the land path is an exact-head approval, the spec stamp, CI and the merge queue: consistent (the spec stamp succeeds at this head).
  • Changeset: focusing Remove rings only that button, focusing Open rings only the image container, and each focus move shows one ring instead of two: true for the ring count; over a photo close to the ring colour the Remove ring cannot be made out (the blocking finding).
  • File .changeset/thumbnail-one-focus-ring.md: see the blocking finding.
  • File apps/storybook/stories/Thumbnail.stories.tsx: clear.
  • File docs/architecture/interaction-modality.md: non-blocking note (verification row).
  • File docs/specs/components/Thumbnail/Thumbnail.spec.md: clear.
  • File packages/core/src/Thumbnail/Thumbnail.test.tsx: clear.
  • File packages/core/src/Thumbnail/Thumbnail.tsx: blocking finding (Remove's indicator over photos).
  • File packages/core/src/__tests__/FocusRingOwner.a11y.chromium.spec.ts: non-blocking note (file header); it counts outlines, not their contrast.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as draft November 14, 2026 19:41
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 71fff8d

@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.

Requesting changes: Thumbnail now shows one ring per focus move, but at the Remove stop that one ring can be impossible to make out.

  • Miss: focusing Remove over a dark photo in light mode, or a light photo in dark mode, leaves no visible focus indicator, because the container no longer rings at that stop (Thumbnail.tsx:519-520) and Remove's own ring sits on the photo at 1.14:1 and 1.03:1 in the neutral theme; give Remove a ring that keeps 3:1 over any photo through the shared focus-outline utility, and add a dark-photo and a light-photo contrast case to the browser spec.

The Thumbnail cases in the Chromium focus-ring spec count outlines, so they pass on a ring that blends into the photo. CI has not run on this head because the pull request is a draft. Not blocking: the INV3 verification row in interaction-modality.md and the @input/@output header of FocusRingOwner.a11y.chromium.spec.ts still describe only Selector.

Claims and files checked

Review mode: same-head; reason: none

  • Claim: before the change, focusing Remove drew two rings, and so did focusing Open: verified (Chromium frames of the base: the container ring plus Remove's ring, or plus Open's browser ring).
  • Claim: after the change, each focus move shows one ring, with Open ringing the image container and Remove ringing only itself: verified for the ring count (the Chromium spec and frames of this patch); not true for what a person sees when the photo under Remove's ring is close to the ring colour (the blocking finding).
  • Claim: the affected users are keyboard users of a Thumbnail with both Open and Remove: narrower than the change, which also changes Open-only and Remove-only thumbnails.
  • Claim: this fixes the Thumbnail part of #8850, Selector was fixed by #8874, and Item, Token and the cards are in #8869 and #8872: verified (#8850 is open and names Thumbnail; #8874 is merged; #8869 and #8872 are open).
  • Claim: the image container takes the shared focus-owner ring instead of the any-focus ring, and Open carries the owner mark: verified (Thumbnail.tsx:520, :531).
  • Claim: Open draws no ring of its own: verified (Thumbnail.tsx:532; the new unit test checks it).
  • Claim: the Thumbnail record states the one-ring behavior, drops its gap and impact bullet with five gaps left, and its verification map names the shared browser spec: verified (Thumbnail.spec.md:130, :46, :224; five Current-state impact bullets remain).
  • Claim: Thumbnail leaves the list of wrappers that write their own ring conditions: verified (interaction-modality.md:158-159).
  • Claim: the new ClickableWithRemove story is the one the browser spec uses: verified (Thumbnail.stories.tsx:154; spec line 85).
  • Claim: a fix changeset is added: verified (.changeset/thumbnail-one-focus-ring.md).
  • Claim: the new unit test fails on main, because the container ring rule matches any focused descendant, and passes here: verified (the base's container ring selectors are the any-focus rule and Open has no owner mark, so the test fails there; it passes on this patch).
  • Claim: the shared browser spec gains a Thumbnail case at 1280 and 390 px that counts every ring at each stop, expects one, and runs on CI's Chromium leg: verified (it reads every element under the story root; the browser-spec job passed on earlier heads with this same patch; CI has not run on this head, a draft).
  • Claim: the one-ring rule decides the behavior, and there is no API change: verified (no public surface changes).
  • Claim: the stills show the base and earlier heads in real Chrome and also hold for a later head: partly verified (the stills were not opened; Chromium frames of this patch show the same one-ring result, and the head the description calls current has since gained a merge of main that leaves this patch unchanged).
  • Claim: writing rubric results for both records: verified (present tense, with no research, change references, rejected alternatives, open questions or new status lines; five gaps listed).
  • Claim: the scope is Thumbnail, its story, tests, records and a changeset, with no internal context: verified.
  • Claim: the land path is an exact-head approval, the spec stamp, CI and the merge queue: consistent (the spec stamp succeeds at this head; CI has not run here).
  • Changeset: focusing Remove rings only that button, focusing Open rings only the image container, and each focus move shows one ring instead of two: true for the ring count; over a photo close to the ring colour the Remove ring cannot be made out (the blocking finding).
  • File .changeset/thumbnail-one-focus-ring.md: see the blocking finding.
  • File apps/storybook/stories/Thumbnail.stories.tsx: clear.
  • File docs/architecture/interaction-modality.md: non-blocking note (verification row).
  • File docs/specs/components/Thumbnail/Thumbnail.spec.md: clear.
  • File packages/core/src/Thumbnail/Thumbnail.test.tsx: clear.
  • File packages/core/src/Thumbnail/Thumbnail.tsx: blocking finding (Remove's indicator over photos).
  • File packages/core/src/__tests__/FocusRingOwner.a11y.chromium.spec.ts: non-blocking note (file header); it counts outlines, not their contrast.

Automated review (maintainer link)

The remove button's own ring can sit on a photo at about 1:1, so the
image container keeps its focus-within ring and the Remove stop shows
two rings, as on main, until its look is decided. Open still draws no
ring of its own. The record keeps a narrower FR4 gap for Remove.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 14, 2026
@cixzhang cixzhang changed the title fix(Thumbnail): one focus ring per focus move fix(Thumbnail): focusing Open shows one ring, not two Nov 14, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec e43f6a1

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 14, 2026

@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 because the pull request is still a draft, so it needs to be marked ready for review and pass CI before it merges.

Focusing Open now shows one ring, on the image container, and the Remove stop keeps both rings exactly as on main, which resolves the earlier concern about Remove's ring over photos. The new unit test fails on main and passes here, and a Chromium ring count shows two rings at Open before and one after, in light, dark and right-to-left. There are no blocking findings; three optional follow-ups:

  • The unit test skips every rule whose selector mentions focus, so it still passes if Open goes back to drawing its own :focus-visible ring; checking every outline-style rule on Open would make it match its name.
  • The focus-ring spec's @input and @output header lines still describe only Selector, while @position now names Thumbnail's Open stop.
  • Issue #8850's Thumbnail row lists only the remove button, so that row stays open after this change; the description could say so.
Claims and files checked

Review mode: full; reason: spec-record

  • Claim: keyboard users of a Thumbnail with Open are affected — verified (Thumbnail.tsx:518-526).
  • Claim: before, focusing Open drew two rings (Open's own inside the container's) — verified (Chromium ring count on main: 2).
  • Claim: after, focusing Open shows one ring, on the container — verified (ring count: 1 in light, dark, right-to-left, at 1280 and 390 px).
  • Claim: focusing Remove still draws two rings, as on main — verified (Remove frames pixel-identical to main).
  • Claim: the record keeps a narrower FR4 gap for Remove — verified (Thumbnail.spec.md:89-92, :134).
  • Claim: this fixes the Open part of the Thumbnail item in #8850 — loose: the issue's Thumbnail row names only the remove button.
  • Claim: Selector was fixed in #8874 and the other components are in #8869 and #8872 — verified against #8850.
  • Claim: Open uses the shared suppressed outline style and the container ring is unchanged — verified (Thumbnail.tsx:526, :508).
  • Claim: FR4 states Open draws no ring, the gap and impact bullet name Remove only, six gaps remain — verified (Thumbnail.spec.md:134, :89, six Current-state bullets).
  • Claim: the verification map and verified-by list name the shared focus-ring spec — verified (Thumbnail.spec.md:17, :228).
  • Claim: a story with Open and Remove is added and used by the browser spec — verified (Thumbnail.stories.tsx:154, spec line 86).
  • Claim: the unit test fails on main because Open keeps its own ring — verified (fails on main: no rest outline rule on Open).
  • Claim: the browser spec counts every ring at 1280 and 390 px and runs on the Chromium leg — verified by reading (spec lines 82-91 and its scope line); not run here.
  • Claim: no public API change — verified (API surface comparison: no rows).
  • Claim: the changeset says focusing Open shows one ring instead of a second one on the button — verified.
  • Claim: the writing rubric lists the touched record parts and keeps six gaps — verified.
  • File .changeset/thumbnail-one-focus-ring.md — clear.
  • File apps/storybook/stories/Thumbnail.stories.tsx — clear.
  • File docs/specs/components/Thumbnail/Thumbnail.spec.md — clear.
  • File packages/core/src/Thumbnail/Thumbnail.test.tsx — optional follow-up (focus-conditioned rules skipped).
  • File packages/core/src/Thumbnail/Thumbnail.tsx — clear.
  • File packages/core/src/__tests__/FocusRingOwner.a11y.chromium.spec.ts — optional follow-up (header).

Automated review (maintainer link)

if (
rule instanceof CSSStyleRule &&
classes.some(cls => rule.selectorText.startsWith(cls)) &&
!rule.selectorText.includes('focus') &&

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.

Non-blocking: this filter drops every focus-conditioned rule, so if Open goes back to focusOutlineProps.focusVisible (its own ring under :focus-visible), all 33 tests still pass; only the browser spec would catch it. Dropping the includes('focus') condition, so every outline-style rule on Open's classes has to be none, makes the test match its name.

…s-ring

# Conflicts:
#	packages/core/src/__tests__/FocusRingOwner.a11y.chromium.spec.ts
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 8d3d79d

@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 because the pull request is still a draft, so it needs to be marked ready for review and pass CI before it merges.

This head only merges main: focusing Open still shows one ring, on the image container, and the Remove stop keeps both rings exactly as on main. The new unit test fails on main and passes here, and a Chromium ring count shows two rings at Open before and one after. Optional follow-ups:

  • The unit test skips every rule whose selector mentions focus, so it still passes if Open goes back to drawing its own :focus-visible ring; checking every outline-style rule on Open would make it match its name.
  • The shared focus-ring spec's @input header still names only the Selector, Item and Token stories, and its @output says the wrapper stays unringed, which Thumbnail's Remove stop does not do.
  • Issue #8850's Thumbnail row lists only the remove button, so that row stays open after this change.
Claims and files checked

Review mode: incremental; reason: none

  • Rule changed since the last review (when an incremental review evaluates changed rules over the whole pull request): checked: both recipe versions, the merge since the last review and its conflict resolution, no finding.
  • Rule changed since the last review (the review mode line and its reasons): checked: this comment's mode line, no finding.
  • Claim: keyboard users of a Thumbnail with Open are affected — verified (Thumbnail.tsx:518-526).
  • Claim: before, focusing Open drew two rings, the button's own inside the container's — verified (Chromium ring count on main: 2).
  • Claim: after, focusing Open shows one ring, on the container — verified (ring count 1 in light, dark, right-to-left, at 1280 and 390 px).
  • Claim: focusing Remove still draws two rings, as on main — verified (Remove frames pixel-identical to main).
  • Claim: Remove's own ring can sit on a photo at about 1:1 — consistent with an earlier measurement (about 1.14:1 and 1.03:1); rationale only, not re-measured.
  • Claim: the record keeps a narrower FR4 gap for Remove — verified (Thumbnail.spec.md:89-92, :134).
  • Claim: this fixes the Open part of the Thumbnail item in #8850 — loose: the issue's Thumbnail row names only the remove button.
  • Claim: Selector was fixed in #8874, and Item, Token and the cards are in #8869 and #8872 — verified (#8874 and #8869 are merged, #8872 is open).
  • Claim: Open uses the shared suppressed outline style and the container ring is unchanged — verified (Thumbnail.tsx:526, :508).
  • Claim: FR4 states that Open draws no ring, the gap and impact bullet name Remove only, and six gaps remain — verified (Thumbnail.spec.md:134, :89, six Current-state bullets).
  • Claim: the verification map and verified-by list name the shared focus-ring spec — verified (Thumbnail.spec.md:16, the FR4 verification row).
  • Claim: a story with Open and Remove is added and used by the browser spec — verified (Thumbnail.stories.tsx:154, spec line 131).
  • Claim: the unit test fails on main because Open keeps its own ring — verified (fails on main: Open has no rest outline rule).
  • Claim: the browser spec counts every ring with Open focused at 1280 and 390 px and runs on the Chromium leg — verified by reading (spec lines 127-136 and its scope line) and by an equivalent Chromium probe; the spec itself has not run on this head.
  • Claim: no public API change — verified (API surface comparison: no rows).
  • Claim: the stills show two rings at Open before and one after, with Remove unchanged — consistent with this review's own captures; the linked stills were not opened.
  • Claim: the writing rubric lists the touched record parts and keeps six gaps — verified.
  • Claim: the scope is Thumbnail, its story, tests, record and a changeset, with no internal context — verified (six files; none found).
  • Claim: the changeset says focusing Open shows one ring, on the container, instead of a second ring on the button — verified.
  • File .changeset/thumbnail-one-focus-ring.md — clear.
  • File apps/storybook/stories/Thumbnail.stories.tsx — clear.
  • File docs/specs/components/Thumbnail/Thumbnail.spec.md — clear.
  • File packages/core/src/Thumbnail/Thumbnail.test.tsx — optional follow-up (focus-conditioned rules skipped).
  • File packages/core/src/Thumbnail/Thumbnail.tsx — clear.
  • File packages/core/src/__tests__/FocusRingOwner.a11y.chromium.spec.ts — optional follow-up (header); merge resolution checked.

Automated review (maintainer link)

@@ -8,10 +8,11 @@
* with Tab, at desktop and phone widths

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.

Non-blocking: the merge added Thumbnail to @output and @position, but @input (lines 6-8) still names only the Selector, Item and Token stories, and @output's "the wrapper stays unringed" does not hold at Thumbnail's Remove stop, which the Thumbnail case does not check. Naming the ClickableWithRemove Thumbnail story in @input, and saying the Thumbnail case checks the Open stop only, keeps the header accurate.

@cixzhang
cixzhang marked this pull request as ready for review November 17, 2026 06:01
@cixzhang
cixzhang merged commit f7ebe67 into main Nov 17, 2026
157 checks passed
@github-actions
github-actions Bot deleted the l0/thumbnail-one-focus-ring branch November 18, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 8d3d79d0 Deployed Nov 15, 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