Repository navigation
Conversation
… focus ring The hover fill alone measured 1.12:1 light and 1.15:1 dark against the list, under the 3:1 non-text contrast minimum. As in Selector, the keyboard-active option now draws the shared focus ring inside its edge; the option the mouse moves onto keeps the fill alone until a key moves the highlight, and entering the active option under a still mouse keeps the ring. In a grid an active action cell keeps its own ring.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec c7daee8 |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Selector | 114.9 kB (+83 B) · 18.7 kB CSS (0) | — | ✗ · ✓ · ✓ |
| SelectorOption | 24.2 kB (0) · 6.7 kB CSS (0) | — | ✗ · ✓ · ✓ |
| MultiSelector · Storybook | 103.5 kB (+286 B) · 17.8 kB CSS (+6 B) | 2,764 (+38) | ✓ · ✓ · ✓ |
14 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| PowerSearch | 310.4 kB (+91 B) · 25.6 kB CSS (0) | — | — · — · — |
| Pagination | 147.7 kB (+80 B) · 19.1 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 309.3 kB (+71 B) · 454 B CSS (0) | — | — · — · — |
| ChatComposer | 85.9 kB (+61 B) · 12.9 kB CSS (0) | — | — · — · — |
| lab/CommentThread | 370.3 kB (+50 B) · 2.4 kB CSS (0) | — | — · — · — |
| ChatComposerInput | 83.5 kB (+47 B) · 12.1 kB CSS (0) | — | — · — · — |
| ChatComposerTokenElement | 83.5 kB (+47 B) · 12.1 kB CSS (0) | — | — · — · — |
| CommandPalette | 78.6 kB (+47 B) · 12.8 kB CSS (0) | — | — · — · — |
| lab/CommentComposer | 180.5 kB (+47 B) · 1.9 kB CSS (0) | — | — · — · — |
| BaseTypeahead | 79.6 kB (+45 B) · 11.7 kB CSS (0) | — | — · — · — |
| Tokenizer | 105.9 kB (+40 B) · 20.4 kB CSS (0) | — | — · — · — |
| Typeahead | 89.2 kB (+40 B) · 13.5 kB CSS (0) | — | — · — · — |
| DateTimeInput | 226.6 kB (+39 B) · 19.8 kB CSS (0) | — | — · — · — |
| lab/Comments | 377.1 kB (+33 B) · 2.5 kB CSS (0) | — | — · — · — |
Visual changes: 4 snapshots in 1 component
A change is a question for the reviewer, not a failure.
Inheritance checked against the 2 newest reports of other pull requests.
Package size: @astryxdesign/core 7.66 MB packed (+1.8 kB); no new dependencies.
Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Changes requested. The ring works for keyboard users and matches the MultiSelector record change an engineering owner approved, and the description's browser frames now back its real-browser claim, but three things need fixing first.
- After someone uses the field with the keyboard, a mouse or finger press that opens the list draws the focus ring on the first option, because the trigger click (
MultiSelector.tsx:1949-1951) never records the highlight move as Selector's does; record it when the list opens and add a test that presses the trigger after keyboard input. - The hovered-row rule (
MultiSelector.tsx:1921-1944) copies Selector's code beside the shareduseKeyboardHighlighthook, and the two copies already differ (the first bullet), so move the rule into the hook and have both components call it once. - Miss: the description says every sentence of the new record paragraph maps to a case in
MultiSelector.activeOption.test.tsx, but no test covers the grid sentence (an active action cell keeps its own ring and the row draws none), so add that case and name it in the verification row, or correct the description.
The new tests fail on the base and pass here, and the Selector and MultiSelector suites pass.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules since the last review (0): none.
Claims:
- Release note: after keyboard input the active option draws the focus ring. Verified (new test, browser frames).
- Release note: the fill alone is under 3:1 against the list. Verified (1.09:1 light, 1.15:1 dark in the default theme).
- Release note and description: after pointer input the active option keeps the fill alone. False for a press that opens the list after keyboard input (first bullet); true for hover.
- Description: the fill measures 1.12:1 light and 1.15:1 dark. Verified for the Storybook preview theme; the default theme measures 1.09:1 light.
- Description: after keyboard input the ring sits inside the option's edge, as in Selector. Verified (2 px outline at a -2 px offset).
- Description: an option the mouse moves onto shows no ring until a key moves the highlight. Verified (test, browser frames).
- Description: an option a key scrolls under a still mouse keeps its ring. Verified (test).
- Description: in a grid the active action cell keeps its own ring and the row draws none. Verified by a review probe; no committed test (third bullet).
- Description: the outline shorthand becomes a longhand so the ring applies. Verified (computed outline).
- Description: the hover rule is the same as Selector's. Verified; it is a copy (second bullet).
- Description: no new prop, export, theme target or data attribute. Verified (built API surface comparison).
- Description: the new test fails on the base and passes here. Verified (5 of 5 fail, 5 of 5 pass).
- Description: the Selector and MultiSelector suites pass. Verified (647 tests).
- Description: TypeScript, ESLint, knowledge and changeset checks are clean. Verified.
- Description: Chromium frames of the base and this head, light and dark, show the ring after two ArrowDown presses and the fill alone on a hovered option. Verified (the embedded frames).
- Description: the record gains an Accessibility paragraph and a verification row and drops the gap bullet. Verified.
- Description: each sentence of the record paragraph maps to a case in the new test file. False for the grid sentence (third bullet).
- Description: the listed overlapping pull requests do not draw this ring. Verified (no open MultiSelector pull request does).
- Description: the fix is decided by records for this family. Not checkable in the repository; an engineering owner approved the record change at this head.
- Description: some Selector listbox cases timed out once under load and pass alone. Not checkable; the full suites pass at this head.
Files:
.changeset/multiselector-active-option-ring.md: finding (its pointer sentence, first bullet).docs/specs/components/MultiSelector/MultiSelector.spec.md: finding (its grid sentence has no test, third bullet); approved at this head.packages/core/src/MultiSelector/MultiSelector.activeOption.test.tsx: findings (no press-open case, no grid case).packages/core/src/MultiSelector/MultiSelector.tsx: findings (first and second bullets).
…he shared keyboard-highlight hook Both components kept their own copy of the rule that the option the mouse enters draws no keyboard ring. The hook now owns that state, and each component tells it which option a hover enters. MultiSelector also records a trigger press, so a pointer press that opens the list after keyboard input draws no ring on the opening highlight, as in Selector.
|
/approve-spec cfc53a9 |
There was a problem hiding this comment.
Changes requested. The two problems from the last review are fixed: a mouse or finger press that opens the list no longer draws the ring, and the hovered-option rule now lives once in the shared useKeyboardHighlight hook. One thing still needs fixing:
- Miss: the description says every sentence of the new record paragraph maps to a case in
MultiSelector.activeOption.test.tsx, but no case covers the grid sentence (MultiSelector.spec.md:206-207, an active action cell draws its own ring and the row draws none), and deleting that exclusion (MultiSelector.tsx:2260) fails none of the 285 MultiSelector tests, so add a grid case and name it in the "Active option" verification row, or correct the description.
The new tests fail on the base, the pointer-open case fails on the previous revision, and all six pass here, as do the Selector and MultiSelector suites.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules since the last review (0): none.
Claims:
- Release note: after keyboard input the active option draws the focus ring. Verified (new test, browser frames).
- Release note: the hover fill alone measured under 3:1 against the list. Verified (1.09:1 light, 1.15:1 dark in the default theme).
- Release note: after pointer input the active option keeps the fill alone, as in Selector. Verified (hover, still-mouse and pointer-open tests; browser frames match the base).
- Description: before the change the fill measured 1.12:1 light and 1.15:1 dark. Verified for the Storybook preview theme; the default theme measures 1.09:1 light.
- Description: after keyboard input the ring sits inside the option's edge, as Selector's does. Verified (2 px outline at a -2 px offset, the same tokens as Selector's style).
- Description: an option the mouse moves onto shows no ring until a key moves the highlight. Verified (test, browser frames).
- Description: an option a key scrolls under a still mouse keeps its ring. Verified (test).
- Description: in a grid the active action cell keeps its own ring and the row draws none. Verified in the code; no committed test (the bullet above).
- Description: the outline shorthand becomes a longhand so the ring applies. Verified (computed outline).
- Description: a trigger press records the highlight move, so a pointer press that opens the list after keyboard input draws no ring, as in Selector. Verified (new test; browser frames of this and the previous revision).
- Description: the hovered-option rule moves into the shared hook, each component tells it which option a hover enters, and Selector's behavior is unchanged. Verified (same order of steps; Selector suite passes).
- Description: no new prop, export, theme target or data attribute. Verified (built API surface comparison).
- Description: the new test file fails on the base. Verified (5 of 6 fail; the pointer-open case passes there because the base draws no ring); the count for the file's first version is not checkable.
- Description: six of six pass here, and the pointer-open case fails on the previous revision. Verified.
- Description: every Selector and MultiSelector test file passes. Verified (21 files, 648 tests; the description says 644).
- Description: browser frames of the base and the revision they name show the ring after two ArrowDown presses and the fill alone on a hovered option. Verified; the same results re-captured on this revision.
- Description: the record gains an Accessibility paragraph and a verification row and drops the gap bullet. Verified.
- Description: each sentence of the record paragraph maps to a case in the new test file. False for the grid sentence (the bullet above).
- Description: the record cites the Selector requirement and the accessibility baseline and adds no new term. Verified.
- Description: the listed overlapping pull requests do not draw this ring. Verified (open MultiSelector pull requests address other defects).
- Description: the fix is decided by records for this family. Not checkable in the repository; an engineering owner approved the record change on this revision.
- Description: TypeScript, ESLint, the knowledge check and the changeset check are clean. Verified.
- Description: public text carries no internal context. Verified.
Files:
.changeset/multiselector-active-option-ring.md: clear.docs/specs/components/MultiSelector/MultiSelector.spec.md: finding (its grid sentence has no test, the bullet above); approved on this revision.packages/core/src/MultiSelector/MultiSelector.activeOption.test.tsx: finding (no grid case).packages/core/src/MultiSelector/MultiSelector.tsx: clear.packages/core/src/Selector/Selector.tsx: clear.packages/core/src/hooks/useKeyboardHighlight.ts: clear.
…ee of the keyboard ring
|
/approve-spec 365903f |
There was a problem hiding this comment.
Changes requested. One pointer path in a grid still draws the keyboard ring:
- Miss: after ArrowRight moves the highlight to a row's action cell, moving the mouse onto that row's option cell draws the focus ring on the row, because
hoveredOptionOf(MultiSelector.tsx:1921-1925) returns null whenever the row index matches and ignores the cell, which contradicts the record's "After pointer input the active option keeps the overlay fill alone" (MultiSelector.spec.md:205-206) and the changeset and description pointer claims, so compare the cell too and add a grid case that hovers the row's option cell after ArrowRight.
The new tests fail on the base (6 of 7) and all 7 pass here, as do the Selector and MultiSelector suites (649 tests, where the description says 644). A fix commit needs a new exact-head /approve-spec for the record change, and CI has not run on this draft yet.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules since the last review (0): none.
Claims:
- Release note: after keyboard input the active option draws the focus ring. Verified (test, browser frames of this revision).
- Release note: the hover fill alone measured under 3:1 against the list. Verified (about 1.1:1 in light and dark).
- Release note: after pointer input the active option keeps the fill alone, as in Selector. False in a grid after a pointer move back from a row's action cell (the bullet above).
- Description: before the change the fill measured 1.12:1 light and 1.15:1 dark. Verified for the Storybook theme; the default theme measures 1.09:1 light.
- Description: after keyboard input the ring sits inside the option's edge, as Selector's does. Verified (2 px outline at a -2 px offset, the same tokens as Selector's style).
- Description: after pointer input the active option keeps the fill alone. False in the grid path above.
- Description: an option the mouse moves onto shows no ring until a key moves the highlight. Verified for other rows (test); false in the grid path above.
- Description: an option a key scrolls under a still mouse keeps its ring. Verified (test).
- Description: in a grid the active action cell keeps its own ring and the row draws none. Verified (test, which fails when the exclusion is removed).
- Description: the fill is the active option's only marker and misses the 3:1 indicator minimum. Verified.
- Description: Selector already draws this ring, and MultiSelector shares its keyboard-highlight hook. Verified (the Selector requirement; both components call the hook).
- Description: the MultiSelector record names the Selector requirement as the repair. Verified (its current-state gap).
- Description: maintainers ruled the fix decided by records for this family. Not checkable in the repository; an engineering owner approved the record change on this revision.
- Description: the outline shorthand becomes a longhand so the ring applies. Verified (computed outline).
- Description: a trigger press records the highlight move, so a pointer press that opens the list after keyboard input draws no ring, as in Selector. Verified (test).
- Description: the hovered-option rule moves into the shared hook, each component tells it which option a hover enters, and Selector's behavior is unchanged. Verified (same order of steps; Selector suite passes).
- Description: no new prop, export, theme target or data attribute. Verified (built API surface comparison and source).
- Description: the new test file fails on the base, all four cases at the first version. Verified (the first version declared four cases; on the base 6 of the 7 tests at this revision fail).
- Description: seven of seven pass here, including the pointer-open case that was red on the previous revision and the grid case that fails without the exclusion. Verified.
- Description: every Selector and MultiSelector test file passes, 644 tests. The files pass; the count is 649 at this revision.
- Description: browser frames show the ring after two ArrowDown presses and the fill alone on a hovered option. Verified for the ring on this revision's frames; the hover case is covered by the tests.
- Description: the record gains an Accessibility paragraph and a verification row and drops the gap bullet. Verified.
- Description: each sentence of the record paragraph maps to a case in the new test file. Verified; the verification row does not name the grid case.
- Description: the record cites the Selector requirement and the accessibility baseline and adds no new term. Verified.
- Description: one defect is restored with no tag-alongs or hidden API. Verified for scope; the grid pointer path above remains.
- Description: the listed overlapping pull requests do not draw this ring. Checked in an earlier review; unchanged.
- Description: the new test file is red on the base and green here, and the MultiSelector and Selector suites pass. Verified.
- Description: TypeScript, ESLint, the knowledge check and the changeset check are clean. Verified (core typecheck, ESLint on the changed files, both checks pass on this revision).
- Description: public text carries no internal context. Verified.
Files:
.changeset/multiselector-active-option-ring.md: finding (its pointer sentence is false in a grid, the bullet above).docs/specs/components/MultiSelector/MultiSelector.spec.md: clear; approved on this revision.packages/core/src/MultiSelector/MultiSelector.activeOption.test.tsx: clear (the grid pointer case is missing, the bullet above).packages/core/src/MultiSelector/MultiSelector.tsx: finding (the bullet above).packages/core/src/Selector/Selector.tsx: clear.packages/core/src/hooks/useKeyboardHighlight.ts: clear.
…he row's fill alone Entering the other cell of the active grid row was read as entering the active option, so a pointer move from the action cell back onto the option cell drew the keyboard ring. The hovered-option rule now compares the cell too: only re-entering the active cell changes nothing.
|
/approve-spec e7ad206 |
There was a problem hiding this comment.
Changes requested: one keyboard path in a grid still loses the focus ring.
- In a grid, when a key moves the highlight to a row and scrolls that row's action cell under a still pointer, the row shows the fill alone with no ring, because
hoveredOptionOf(MultiSelector.tsx:1924-1930) now counts the browser's entry report during that scroll as a hover, which contradicts the record's "After keyboard input the active option draws the shared focus ring" (MultiSelector.spec.md:203-204), so count only a move from the action cell onto the option cell as a hover and add a grid case that enters the active row's action cell after ArrowDown.
The pointer move from a row's action cell back onto its option cell now keeps the fill alone, and the Selector and MultiSelector suites pass. Please also update the description's counts (8 tests in the new file, 650 in the two suites) and shorten the new comment above hoveredOptionOf. CI has not run on this draft yet.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules since the last review: changed rules (0): none.
Claims:
- Release note: after keyboard input the active option draws the focus ring. False in a grid when a key scrolls the active row's action cell under a still pointer (the bullet above); verified otherwise (test, browser frames of this revision).
- Release note: the hover fill alone measured under 3:1 against the list. Verified (about 1.1:1 in light and dark).
- Release note: after pointer input the active option keeps the fill alone, as in Selector. Verified (tests, including the grid pointer return).
- Description: before the change the fill measured 1.12:1 light and 1.15:1 dark. Verified for light (a 5% fill on white is 1.12:1); dark checked in an earlier review, with no theme or token file changed since.
- Description: after keyboard input the ring sits inside the option's edge, as Selector's does. Verified (2 px outline at a -2 px offset, the same tokens as Selector's style).
- Description: after pointer input the active option keeps the fill alone. Verified (tests).
- Description: an option the mouse moves onto shows no ring until a key moves the highlight. Verified (tests, including the grid pointer return).
- Description: an option a key scrolls under a still mouse keeps its ring. False in a grid when the pointer rests over the action column (the bullet above).
- Description: in a grid the active action cell keeps its own ring and the row draws none. Verified (test).
- Description: the fill is the active option's only marker and misses the 3:1 indicator minimum. Verified.
- Description: Selector already draws this ring, and MultiSelector shares its keyboard-highlight hook. Verified (the Selector requirement; both components call the hook).
- Description: the MultiSelector record names the Selector requirement as the repair. Verified (its current-state gap names it).
- Description: maintainers ruled the fix decided by records for this family. Not checkable in the repository; an engineering owner approved the record change on this revision.
- Description: the outline shorthand becomes a longhand so the ring applies. Verified (computed outline).
- Description: a trigger press records the highlight move, so a pointer press that opens the list after keyboard input draws no ring, as in Selector. Verified (test).
- Description: the hovered-option rule moves into the shared hook, each component tells it which option a hover enters, and Selector's behavior is unchanged. Verified (Selector suites pass).
- Description: no new prop, export, theme target or data attribute. Verified (built API surface comparison and source).
- Description: the new test file fails on the base, all four cases at the first version. Verified in earlier reviews; the ring cases fail on the base.
- Description: seven of seven pass after the change. False count: the file has 8 tests at this revision, all passing.
- Description: every Selector and MultiSelector test file passes, 644 tests. The files pass; the count is 650 at this revision.
- Description: browser frames of an earlier revision show the ring after two ArrowDown presses and the fill alone on a hovered option. Verified for the ring on this revision's own frames; the hover case is covered by tests.
- Description: the record gains an Accessibility paragraph and a verification row and drops the gap bullet. Verified.
- Description: each sentence of the record paragraph maps to a test case. Verified; the verification row does not name the grid cases.
- Description: the record cites the Selector requirement and the accessibility baseline and adds no new term. Verified.
- Description: one defect is restored, with no tag-alongs or hidden API. Verified for scope; the grid still-pointer path above remains.
- Description: public text carries no private context. Verified.
- Description: the new test file is red on the base and green here, and the MultiSelector and Selector suites pass. Verified.
- Description: TypeScript, ESLint, the knowledge check and the changeset check are clean. Verified (ESLint on the changed files and both checks on this revision; the typecheck in an earlier core build of this revision).
- Description: the listed overlapping pull requests do not draw this ring. Checked in an earlier review; unchanged.
Files:
.changeset/multiselector-active-option-ring.md: finding (its keyboard-ring sentence is false in the grid still-pointer path, the bullet above).docs/specs/components/MultiSelector/MultiSelector.spec.md: clear; approved on this revision.packages/core/src/MultiSelector/MultiSelector.activeOption.test.tsx: clear (no case covers the still pointer on the action column, the bullet above).packages/core/src/MultiSelector/MultiSelector.tsx: finding (the bullet above; a non-blocking comment-length note).packages/core/src/Selector/Selector.tsx: clear.packages/core/src/hooks/useKeyboardHighlight.ts: clear.
…ill pointer keeps the ring The browser reports a pointer entry when a scroll moves a cell under a still pointer. Counting every entry into the other cell of the active row as a hover dropped the ring after a key. Only a move from the action cell back onto the option cell now counts as pointer input.
|
/approve-spec 2a270d1 |
There was a problem hiding this comment.
Changes requested: one pointer path in a grid still draws the keyboard ring.
- Miss: in a grid, when a key scrolls the active row's option cell under a still pointer and ArrowRight then moves the highlight to that row's action cell, the next pointer move returns the highlight to the row with the keyboard ring, because
hoveredOptionOf(MultiSelector.tsx:1925-1932) judges the held entry when it arrives instead of when it takes effect, which contradicts the record's "After pointer input the active option keeps the overlay fill alone" (MultiSelector.spec.md:205-206), so decide the hovered row when the held entry is applied (or drop it when ArrowRight or ArrowLeft moves the cell) and add a grid case for that sequence.
The keyboard ring itself works and matches the record change an engineering owner approved for this revision. The Selector and MultiSelector suites, the typecheck, ESLint and the knowledge and changeset checks pass on this revision. CI has not run on this draft yet.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules since the last review: changed rules (0): none.
Claims:
- Release note: after keyboard input the active option draws the focus ring. Verified (tests; browser frames of this revision in light and dark).
- Release note: the hover fill alone measured under 3:1 against the list. Verified (about 1.1:1 in light and dark).
- Release note: after pointer input the active option keeps the fill alone, as in Selector. False in a grid when a pointer move follows a key scroll and ArrowRight (the bullet above); verified otherwise.
- Description: before the change the fill measured 1.12:1 in light and 1.15:1 in dark. Verified (the rendered light fill, 5% black on white, is 1.12:1; dark is 1.15:1).
- Description: after keyboard input the ring sits inside the option's edge, as Selector's does. Verified (a 2 px outline at a -2 px offset).
- Description: after pointer input the active option keeps the fill alone. False in the grid path above.
- Description: an option the mouse moves onto shows no ring until a key moves the highlight. Verified (tests).
- Description: an option a key scrolls under a still mouse keeps its ring. Verified, including the grid action column (tests; browser frame).
- Description: in a grid the active action cell keeps its own ring and the row draws none. Verified (test).
- Description: the fill is the active option's only marker and misses the 3:1 indicator minimum. Verified.
- Description: Selector already draws this ring, and MultiSelector shares its keyboard-highlight hook. Verified.
- Description: the MultiSelector record names the Selector requirement as the repair. Verified.
- Description: maintainers ruled the fix decided by records for this family. Not checkable in the repository; an engineering owner approved the record change on this revision.
- Description: the outline shorthand becomes a longhand so the ring applies. Verified (computed outline).
- Description: a trigger press records the highlight move, so a pointer press that opens the list after keyboard input draws no ring. Verified (test).
- Description: the hovered-option rule moves into the shared hook, each component names the option a hover enters, and Selector's behavior is unchanged. Verified (Selector suites pass).
- Description: no new prop, export, theme target or data attribute. Verified (built API surface comparison and source).
- Description: the new test file fails on the base. Verified (7 of 9 cases fail there).
- Description: 9 of 9 pass after the change, covering the listed cases, and removing the grid exclusion fails the grid case. Verified.
- Description: every Selector and MultiSelector test file passes, 651 tests. Verified (21 files, 651 tests).
- Description: browser frames show the ring after two ArrowDown presses and the fill alone on a hovered option. Verified for the ring on this revision's own frames; the hover case is covered by tests.
- Description: the record gains an Accessibility paragraph and a verification row and drops the gap bullet. Verified.
- Description: each sentence of the record paragraph maps to a test case. Verified; the verification row does not name the grid cases.
- Description: the record cites the Selector requirement and the accessibility baseline and adds no new term. Verified.
- Description: one defect is restored, with no tag-alongs or hidden API. Verified for scope; the grid path above remains.
- Description: public text carries no private context. Verified.
- Description: the new test file is red on the base and green here, and both suites pass. Verified.
- Description: TypeScript, ESLint, the knowledge check and the changeset check are clean. Verified on this revision.
- Description: the listed overlapping pull requests do not draw this ring. Checked in an earlier review; unchanged.
Files:
.changeset/multiselector-active-option-ring.md: finding (its pointer sentence is false in the grid path above).docs/specs/components/MultiSelector/MultiSelector.spec.md: clear; approved on this revision (non-blocking: the verification row does not name the grid cases).packages/core/src/MultiSelector/MultiSelector.activeOption.test.tsx: clear (no case covers the held entry after ArrowRight).packages/core/src/MultiSelector/MultiSelector.tsx: finding (the bullet above).packages/core/src/Selector/Selector.tsx: clear.packages/core/src/hooks/useKeyboardHighlight.ts: clear.
… a waiting hover A hover that arrived while a key held the highlight waited for the next pointer move. If ArrowRight or ArrowLeft then moved the highlight to the row's other cell, the waiting hover landed afterwards and returned the highlight to the row with the keyboard ring. A cell move now holds the highlight again, as a row move does, so the waiting hover is dropped.
|
/approve-spec 7a085ba |
There was a problem hiding this comment.
Changes requested: the grid pointer path from the last review is fixed, but the fix routes a key decision through an Effect, and the module it grows needs an INV19 reason.
- The cell-key fix counts ArrowRight and ArrowLeft in state (
MultiSelector/hooks.ts:182,:241,:249) only to re-run the scroll Effect throughholdKey(useHighlightedOptionScroll.ts:188), which contradicts the runtime rule that no Effect reacts to interaction state (architecture:react-component-runtimeINV3), so return the hold restart (startHold, which already clears the waiting hover) fromuseHighlightedOptionScroll, call it in those two key branches, and deletecellMovesandholdKey. MultiSelector/hooks.ts(401 lines, about 3.6 KB gzip) is a keyboard behavior module over the INV19 threshold that this pull request grows, and it builds on none of INV19's shared engines whilecomponent:MultiSelectornames no reason, so add one sentence to the record saying why none fits (it reusesuseHighlightedOptionScrollanduseTypeahead).- The description says the Selector and MultiSelector suites run 651 tests, but this revision runs 652, so update the count.
- Miss: the description calls the linked browser frames "this head", but they come from an earlier revision, so relabel them (this revision behaves the same on that path).
The keyboard ring, the hover rule and every grid path work at this revision, and the record change carries an engineering owner's approval for it. CI has not run on this draft yet.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none.
Claims:
- Release note: after keyboard input the active option draws the focus ring. Verified (tests; browser frames of this revision in light and dark).
- Release note: the hover fill alone measured under 3:1 against the list. Verified (about 1.1:1 in light and dark).
- Release note: after pointer input the active option keeps the fill alone, as in Selector. Verified, grid paths included (tests; browser probe of the grid path).
- Description: before the change the fill measured 1.12:1 in light and 1.15:1 in dark. Verified (5% black on white, 5% white on the dark list).
- Description: after keyboard input the ring sits inside the option's edge, as Selector's does. Verified (a 2 px outline at a -2 px offset).
- Description: after pointer input the active option keeps the fill alone. Verified (tests; browser probe).
- Description: an option the mouse moves onto shows no ring until a key moves the highlight. Verified (test).
- Description: an option a key scrolls under a still mouse keeps its ring. Verified (tests, the grid action column included).
- Description: in a grid the active action cell keeps its own ring and the row draws none. Verified (test; browser frame).
- Description: the fill is the active option's only marker and misses the 3:1 indicator minimum. Verified.
- Description: Selector already draws this ring, and MultiSelector shares its keyboard-highlight hook. Verified.
- Description: the MultiSelector record names the Selector requirement as the repair. Verified.
- Description: maintainers ruled the fix decided by records for this family. Not checkable in the repository; an engineering owner approved the record change on this revision.
- Description: the outline shorthand becomes longhands so the ring applies. Verified (computed outline).
- Description: a trigger press records the highlight move, so a pointer press that opens the list after keyboard input draws no ring. Verified (test).
- Description: the hovered-option rule moves into the shared hook, each component names the option a hover enters, and Selector's behavior is unchanged. Verified (Selector suites pass).
- Description: no new prop, export, theme target or data attribute. Verified (built API surface comparison and source).
- Description: the new test file fails on the base. Verified (8 of 10 cases fail there).
- Description: 10 of 10 pass after the change, covering the listed cases, and removing the grid exclusion fails the grid case. Verified (10 of 10; the exclusion and its case are unchanged since an earlier check).
- Description: a hover that waited through ArrowRight is dropped instead of returning the highlight to the row. Verified (the case fails on the previous revision and passes here; browser probe).
- Description: every Selector and MultiSelector test file passes, 651 tests. False: they pass, with 652 tests at this revision.
- Description: with the shared hooks, CommandPalette and Typeahead suites, 2,250 tests pass. Verified.
- Description: browser frames show the ring after two ArrowDown presses and the fill alone on a hovered option, at "this head". The behavior holds on this revision (this review's frames); the frames come from an earlier revision, so the label is false.
- Description: the record gains an Accessibility paragraph and a verification row and drops the gap bullet. Verified.
- Description: each sentence of the record paragraph maps to a test case. Verified; the verification row does not name the grid cases.
- Description: the record cites the Selector requirement and the accessibility baseline and adds no new term. Verified.
- Description: one defect is restored, with no tag-alongs or hidden API. Verified for scope.
- Description: public text carries no private context. Verified.
- Description: the new test file is red on the base and green here, and both suites pass. Verified.
- Description: TypeScript, ESLint, the knowledge check and the changeset check are clean. Verified on this revision.
- Description: the listed overlapping pull requests do not draw this ring. Checked in an earlier review; unchanged.
Files:
.changeset/multiselector-active-option-ring.md: clear.docs/specs/components/MultiSelector/MultiSelector.spec.md: clear; approved on this revision (non-blocking: the verification row does not name the grid cases).packages/core/src/MultiSelector/MultiSelector.activeOption.test.tsx: clear.packages/core/src/MultiSelector/MultiSelector.tsx: clear.packages/core/src/MultiSelector/hooks.ts: finding (the cell-key counter; the INV19 threshold).packages/core/src/Selector/Selector.tsx: clear.packages/core/src/hooks/useHighlightedOptionScroll.ts: finding (holdKeyre-runs the Effect on interaction state).packages/core/src/hooks/useKeyboardHighlight.ts: clear.
…k, not an Effect useHighlightedOptionHover returns holdHighlight beside highlightFromHover, and MultiSelector calls it in the ArrowRight and ArrowLeft cell branches, so a hover that waited through the key is dropped without state that only re-runs an Effect (react-component-runtime INV3). useHighlightedOptionScroll keeps its signature for the other lists. component:MultiSelector PR2 records why INV19's shared engines do not fit its keyboard module.
|
/approve-spec 9966329 |
There was a problem hiding this comment.
Changes requested: the description fixes from the last review are in, and the MultiSelector record change has an engineering owner's approval at this head, but one pointer path still draws the keyboard ring.
- Miss: after keyboard input, clicking the option you arrowed to toggles it but leaves the focus ring on it while the list stays open, because the row's click (
MultiSelector.tsx:2218-2222) never tellsuseKeyboardHighlightabout the press and an entry into the active row marks no hover (:1932-1937), which contradicts "After pointer input the active option keeps the overlay fill alone" (MultiSelector.spec.md:209-210) and the changeset's matching sentence; record the press as pointer input (for examplesetHoveredIndex(flatIndex)from the row'sonPointerDown, as Selector's press path does for its active option) and add the click case toMultiSelector.activeOption.test.tsx.
A reproduction fails on this head for a click on the arrowed-to option and for a press on an option a key scrolled under a resting pointer; the suggested one-line change makes both pass with every existing MultiSelector test still green. The non-blocking note on the JSDoc placement in useHighlightedOptionScroll.ts still stands.
Claims and files checked
Review mode: same-head; reason: none
- Claim: after keyboard input the active option draws the focus ring (title, changeset): verified by the new tests and this head's Chromium frames
- Claim: the hover fill alone measures about 1.12:1 light and 1.15:1 dark against the list: verified from the theme tokens and the rendered fill
- Claim: after pointer input the active option keeps the fill alone, as in Selector (changeset, Unchanged): false for a mouse press on the keyboard-active option; true for a hover onto another option and a press that opens the list
- Claim: the option the mouse moves onto shows no ring until a key, an option a key scrolls under a still mouse keeps its ring, and in a grid an active action cell keeps its own ring: verified by the new cases
- Claim: Selector already solves this with the same hook and its behavior is unchanged: verified against Selector's record and its passing suite
- Claim: the maintainers ruled the fix records-decided for this family: not found in the repository; the exact-head record approval settles the record change
- Claim: the ring style is inset by its own width and the row's outline becomes outline-style: verified in
MultiSelector.tsx - Claim: a trigger press records the highlight move: verified in
MultiSelector.tsxand its test - Claim: no new prop, export, theme target or data attribute: verified; the built package surface is unchanged
- Claim: the new test file fails on main and passes here, 10 of 10: verified
- Claim: removing the grid exclusion fails a case: verified
- Claim: 661 Selector and MultiSelector tests pass, 3,113 with the related suites: verified
- Claim: the browser frames come from an earlier revision that behaves the same: consistent with this head's frames
- Claim: the record gains the Accessibility paragraph and the verification row and drops the Current-state bullet: verified; PR2 is also added and named in the rubric section
- Claim: the writing rubric R1 to R7 passes over the record change, PR2 included: verified
- Claim: first-load gzip is unchanged on the four reference pages and grows 47 B, 69 B and 234 B on Typeahead, Selector and MultiSelector pages: verified
- Claim: TypeScript, ESLint, knowledge and changeset checks are clean: verified
- Claim: the listed overlapping pull requests each fix a different defect: verified
- Claim: grid cell keys call
holdHighlightwith no state that only re-runs an Effect,useHighlightedOptionScrollkeeps its signature, and PR2 records why INV19's engines do not fit: verified - File
.changeset/multiselector-active-option-ring.md: the pointer sentence is false on the press path (above) - File
docs/specs/components/MultiSelector/MultiSelector.spec.md: clear (non-blocking: the verification row names no grid case) - File
packages/core/src/MultiSelector/MultiSelector.activeOption.test.tsx: clear (no case presses the keyboard-active option) - File
packages/core/src/MultiSelector/MultiSelector.tsx: a press on the keyboard-active option keeps the ring (above) - File
packages/core/src/MultiSelector/hooks.ts: clear - File
packages/core/src/Selector/Selector.tsx: clear - File
packages/core/src/hooks/useHighlightedOptionScroll.ts: clear (non-blocking JSDoc placement) - File
packages/core/src/hooks/useKeyboardHighlight.ts: clear
…ring The row's press now records pointer input for that option, as an entry into another option does, so clicking the arrowed-to option (or one a key scrolled under a resting pointer) keeps the fill alone while the list stays open. The hook's JSDoc moves onto useHighlightedOptionHover.
|
/approve-spec b98ed9a |
There was a problem hiding this comment.
Approved pending CI: the unit-test shards have not finished on this head yet. The keyboard ring and the press, hover and grid paths pass here and when merged with current main, and an engineering owner approved the MultiSelector record change at this head.
CI's visual report lists four changed frames in Selector's bottom-sheet stories, all the sheet's top edge sitting higher; the wide story renders pixel-identically on this pull request's base and head, so that change comes from elsewhere.
Two optional notes: the header of useHighlightedOptionScroll.ts still lists only useHighlightedOptionScroll under @output, and the "Active option" verification row in the MultiSelector record names no grid case (the description's Records section also still leaves out PR2).
Claims and files checked
Review mode: same-head; reason: none
- changed rules (0): none
- Claim: after keyboard input the active option draws the focus ring (title, changeset): verified by the ring tests and Chromium in light and dark
- Claim: the hover fill alone measures under 3:1 against the list (about 1.12:1 light, 1.15:1 dark): verified from the theme tokens and the rendered 5% fill
- Claim: after pointer input the active option keeps the fill alone, as in Selector (changeset, Unchanged): verified for a hover onto another option, a press that opens the list, a press on the arrowed-to option and the grid pointer paths
- Claim: the option the mouse moves onto shows no ring until a key, an option a key scrolls under a still mouse keeps its ring, and in a grid an active action cell keeps its own ring while the row draws none: verified by the new cases
- Claim: the active option's only marker is the overlay hover fill: verified in the base styles
- Claim: Selector already draws the ring from the focus tokens, meeting 3:1 in every theme: verified; the ring token measures 3.10:1 to 17.22:1 against the popover across the default and seven themes, light and dark
- Claim: MultiSelector shares Selector's keyboard-highlight hook and now draws the same ring with the same rule: verified in both components
- Claim: the MultiSelector record named Selector's rule as the repair: verified in the base record's current-state section
- Claim: the maintainers ruled the fix records-decided for this family: not found in the repository; the exact-head record approval settles the record change
- Claim: the ring style is inset by its own width, and the row's outline becomes outline-style: verified in
MultiSelector.tsx - Claim: a trigger press records the highlight move, so a pointer press that opens the list draws no ring: verified in
MultiSelector.tsxand its test - Claim: the hovered-option rule moves into the shared hook, each component names the option a hover enters, and Selector's behavior and suite are unchanged: verified in
useKeyboardHighlight.ts,Selector.tsxandMultiSelector.tsx - Claim: no new prop, export, theme target or data attribute: verified; the generated API delta for this head lists no change
- Claim: the new test file fails on main and its listed cases pass here: verified; its eleven cases pass at this head and merged with current main
- Claim: removing the grid exclusion fails a case: verified (two cases fail)
- Claim: every Selector and MultiSelector test file passes, and with the shared hooks, CommandPalette, Typeahead, Chat and DateTimeInput suites about 3,113 tests pass: verified; 3,114 pass at this head
- Claim: the earlier-revision browser frames behave the same as this head on that path: consistent with this head's frames
- Claim: a press on the arrowed-to option keeps the fill alone with the list open, and the new case fails without the press handler: verified by that case, its mutation and Chromium
- Claim: Chrome case 1, this head rings the active option and main shows the fill only: verified in Chromium
- Claim: Chrome case 2, the press toggles the option with the list open on both, this head's ring goes away, and focus leaves the field on both: verified in Chromium (focus moves to the page body on both)
- Claim: Chrome case 3, the action cell rings on both and then the option cell shows the fill only on both: verified by the grid cases and the base code, where the row never rings
- Claim: the row action icon renders as text in the author's local builds: describes the author's frames; this pull request changes no icon code
- Claim: the record gains the Accessibility paragraph and the verification row and drops the Current-state bullet: verified; it also adds PR2, which the rubric section names
- Claim: the writing rubric R1 to R7 passes over the record change: verified
- Claim: first-load gzip is unchanged on the four reference pages and grows 47 B on Typeahead, 69 B on Selector and 234 B on MultiSelector, measured at the previous revision: verified; at this head the reference pages stay at +0 B and the MultiSelector page grows 265 B
- Claim: TypeScript, ESLint, knowledge and changeset checks are clean: verified; CI's typecheck and lint pass at this head
- Claim: the listed overlapping pull requests each fix a different defect: verified
- Claim: grid cell keys call
holdHighlightwith no state that only re-runs an Effect,useHighlightedOptionScrollkeeps its signature, and PR2 records why the shared engines do not fit: verified - File
.changeset/multiselector-active-option-ring.md: clear - File
docs/specs/components/MultiSelector/MultiSelector.spec.md: clear (non-blocking: the verification row names no grid case) - File
packages/core/src/MultiSelector/MultiSelector.activeOption.test.tsx: clear - File
packages/core/src/MultiSelector/MultiSelector.tsx: clear - File
packages/core/src/MultiSelector/hooks.ts: clear - File
packages/core/src/Selector/Selector.tsx: clear - File
packages/core/src/hooks/useHighlightedOptionScroll.ts: clear (non-blocking: the header's@output) - File
packages/core/src/hooks/useKeyboardHighlight.ts: clear
rubyycheung
left a comment
There was a problem hiding this comment.
Design approved. I compared the before-and-after screenshots after two Down-arrow presses: the active option gains a clear inset outline rather than relying on the faint background fill. This follows the existing Selector focus treatment and keeps focus distinct from the checkbox selection state. This is design sign-off based on the supplied visual evidence, not an independent test or CI verdict.












User impact
Problem and solution fit
--color-overlay-hover, a light tint.Selector already solves this (
component:SelectorAR5): the keyboard-active option draws the focus ring, from the focus tokens, so it meets 3:1 in every theme. MultiSelector shares Selector's keyboard-highlight hook and now draws the same ring with the same rule.Expected behavior and authority
component:SelectorAR5, which the MultiSelector record named as the repair in its Current-state impact. The maintainers ruled it records-decided for this family.spec:AST-020FR1 (WCAG 2.2 SC 1.4.11).Smallest restoration
MultiSelector.tsx: anitemKeyboardHighlightedstyle (the focus outline, inset by its own width), applied to the active option after keyboard input. The item'soutline: 'none'becomesoutlineStyle: 'none', so the ring's longhands apply. A trigger press records the highlight move, so a pointer press that opens the list after keyboard input draws no ring, as in Selector.hooks/useKeyboardHighlight.ts: the hovered-option rule (the option the mouse enters shows no ring until a key moves the highlight; entering the active option changes nothing) moves from Selector into the shared hook. Selector and MultiSelector each tell it which option a hover enters. Selector's behavior is unchanged; its suite passes.Evidence
Reproduction before the change:
MultiSelector.activeOption.test.tsxfails onmain(4 of 4 at the first version: no ring after keyboard input, contrast under 3:1).Result after the change: 10 of 10 pass: the ring after keyboard input; the fill alone after a hover and the ring again on the next key; the ring kept when the active option is entered under a still mouse; no ring on the opening highlight when a pointer press opens the list after keyboard input (red on the previous head); in a grid, a key that makes a row's action cell active rings the cell and not the row, and the row's ring returns on ArrowLeft (removing the grid exclusion fails it); the ring color at 3:1 or more against the listbox in light and dark. In a grid: a pointer move from a row's action cell back onto its option cell keeps the fill alone, a key that scrolls the active row's action cell under a still pointer keeps the ring, and a hover that waited through ArrowRight is dropped instead of returning the highlight to the row.
Representative unchanged path: every Selector and MultiSelector test file passes (661 tests, with main merged; with the shared hooks, CommandPalette, Typeahead, Chat and DateTimeInput suites, 3,113), including Selector's own active-option cases that now run through the shared hook.
Real browser (Chromium, 2x,
core-multiselector--default,main64260e6 against an earlier revision, c7daee8, which behaves the same on this path, light and dark). Tab to the trigger and press ArrowDown twice: that revision draws the ring on "Created",mainthe fill alone. Then hover "Email": the hovered option shows the fill alone on both.Single frames: light, main, light, head, dark, main, dark, head, hover, light, head, hover, dark, head.
A press on the active option: after keyboard input, pressing the arrowed-to option (or one a key scrolled under a resting pointer) records pointer input for it, so it keeps the fill alone while the list stays open. A new case in
MultiSelector.activeOption.test.tsxfails without the press handler and passes with it.Real-Chrome stills at b98ed9a (vs merge base 7658fcf)
Chromium 149, 2×, light theme.
Records
component:MultiSelector: the Accessibility contract states the active-option rule (by reference tocomponent:SelectorAR5), the verification map gains an "Active option" row naming the new tests, and the Current-state impact drops the active-option bullet.Writing rubric results
Records touched:
component:MultiSelector(one Accessibility paragraph, one verification row, one Current-state bullet removed, PR2).#number,/pull/or/issues/.Size
First-load gzip (
architecture:component-import-boundariesINV10), base against head withpnpm size:pages, measured at 9966329 (this head adds one press handler to the MultiSelector row): +0 B on the docs, form, menu and table pages; +47 B on a Typeahead page; +69 B on a Selector page; +234 B on a MultiSelector page.Scope
Components: MultiSelector
Testing
vitest run packages/core/src/MultiSelector/MultiSelector.activeOption.test.tsx: red onmain, green here.vitest run packages/core/src/MultiSelector packages/core/src/Selector: pass.check:knowledgeandcheck:changesets: clean.Overlap checked: #12123, #12122, #12087, #11987, #11220 (each edits MultiSelector source and record for a different defect: the search trigger's aria-required, the active option's VoiceOver name, an empty popup's role, sheet search focus, field label text; none draws the active option's ring), #11868 (MultiSelector audit; no MultiSelector source), #11484 (read-only caller trigger; separate concern)
Owner: Astryx fix-loop lane 0. Land path: CodeBunny approval of the exact head, Specs stamp, CI, then the merge queue.
Grid cell keys: ArrowRight and ArrowLeft between a row's cells call
holdHighlightfromuseHighlightedOptionHover, the shared hover hook. That holds the highlight again and drops a hover that waited through the key, with no state that exists only to re-run an Effect.useHighlightedOptionScrollkeeps its signature for the other lists.component:MultiSelectorPR2 records why INV19's shared engines don't fit its keyboard module.