Skip to content

fix(InputClearButton): a 24 px target under a fine pointer, grown away from the text - #12125

Merged
cixzhang merged 6 commits into
mainfrom
fix/input-clear-button-target
Nov 21, 2026
Merged

cixzhang merged 6 commits into
mainfrom
fix/input-clear-button-target

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Primary intent

Fix: the input-family clear button takes a target of at least 24 × 24 CSS px under a mouse or pen (WCAG 2.2 SC 2.5.8).

User impact

  • People clearing a field with a mouse, trackpad or pen, especially with a motor impairment: the × in TextInput, NumberInput, DateInput, TimeInput, DateTimeInput, the selectors and the other input-family fields had a 20 × 20 target. It now takes at least 24 × 24, so a click just beside the glyph still clears.
  • A click at the end of the text still places the caret: the extra target grows up, down and toward the field's end, never toward the text, so a near-miss never clears the field by accident.
  • Unchanged: the 20 px button looks the same. Under a finger, Button's shared touch band still grows the target toward 44 px (AST-094 FR42).
  • Builders: no API change.

Change

  • InputClearButton.tsx: under @media (pointer: fine), the button's own ::after (Button's caller-decoration slot) extends 2 px up and down and 4 px toward the inline end, with logical insets so RTL mirrors it. It covers the button's 20 px plus 4 px toward the end on the inline axis, and 24 px on the block axis.
  • The media condition sits on private custom properties of the button (--_input-clear-target, --_input-clear-target-hole) that the ::after reads, because a StyleX style passed to Button takes no condition inside a pseudo-element.
  • The ::after has an even-odd clip-path hole over the button's own box (mirrored under :dir(rtl)), so a pointer on the glyph reaches the glyph and a theme's input-clear-icon :hover style applies, as in the DateInput "Themed clear icon" and Selector "Themed icons" stories.
  • Under a coarse pointer the ::after is off, so each pointer type has exactly one hit area.
  • theme/derivedVarRegistry.test.ts: the two private vars join its list of private system vars, with the reason: they are not a theme surface.
  • InputClearButton.test.tsx: the test that pinned "the shared touch band, not a fixed overlay of its own" still requires the band under a finger. It now also checks, in the source, that the fine-pointer ::after is generated only outside a coarse pointer. That it does not grow toward the text is checked by the Chromium spec below, not by this unit test.

Authority

  • spec:AST-020 FR1: Core meets WCAG 2.2 AA, including SC 2.5.8.
  • spec:AST-094 FR42: a hit-area expansion never overlaps a neighboring interactive element's target. The text input is that neighbor, so the growth goes only into the field's padding and the end lane.

No record change.

Evidence

  • Field/__tests__/InputClearButtonTarget.a11y.chromium.spec.ts, over the clearable stories of TextInput, NumberInput, DateInput, TimeInput, DateTimeInput and MultiSelector, checks that:
    • points half a pixel inside the 24 px target on its top, bottom and end sides hit the button;
    • the point 1 px past the button's text-side edge does not (Chromium gives a point within a pixel of a whole-pixel edge to the element);
    • the button stays 20 × 20;
    • the button's centre reaches the glyph, so the glyph's hover applies (on the previous revision, 7 of the 8 cases fail this check because the ::after covered the glyph);
    • the same holds right to left (TextInput, with the story's direction set to RTL);
    • a click on the text input's last column focuses it with the caret at the end and the value unchanged.
  • Chromium: the spec passes 8/8, twice.
  • Preflight (Linux build machine, at the previous head 952aa59): review:pre, build, typecheck, lint, knowledge and changesets pass; vitest node passes except offline-media's two real-browser cases, which need the machine's proxy unset (24/24 without it). vitest ui found two guard failures, which this head fixes: the touch-presentation guard admits @media (pointer: fine), not @media not (pointer: coarse), and the derived-var registry needed the two private vars. At this head those two suites and the unit test pass (202 tests), and the Chromium spec passes 8/8 twice. Scoped browser specs at 952aa59: InputClearButtonTarget, ButtonHitArea, FileInputAudit, NumberInputAudit and FocusRingOwner pass (6 interaction, 62 a11y).
  • Unit: InputClearButton.test.tsx passes 20/20; tsc (core) and eslint clean.

Owner and land path

  • Owner: Astryx maintainers, fix-loop lane 0.
  • Land path: code review, CI, merge.

Overlap checked: #11967, #11205 (#11967 changes the clear button's tooltip description and #11205 changes how the coarse-pointer band is checked; this adds the fine-pointer target. #11205 also edits the touch-band test here, so whichever lands second merges main)

…y from the text

The clear button is 20 px square, so under a mouse or pen its target fell
under WCAG 2.2's 24 by 24 minimum. Its own ::after, Button's decoration
slot, now grows it 2 px up and down and 4 px toward the field's end under a
fine pointer only. It never grows toward the text, so a click at the end of
the text still places the caret. Under a coarse pointer Button's shared
touch band still grows it, unchanged.

A Chromium spec checks six clearable fields: the 24 px target hits the
button on its block and end sides, the text side stays the field's, the
button stays 20 by 20, and a click at the end of the text places the caret.
@vercel

vercel Bot commented Nov 16, 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 21, 2026 2:29am UTC

Request Review

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

astracat-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 21, 2026, 7:36 AM UTC

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 16, 2026
Chromium's hit test gives a point within a pixel before an element's
whole-pixel edge to that element, so the half-pixel probe landed on the
button on main and head alike. The probe now sits 1 px out, where the
field takes it.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 8b0fe8b

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 543fcfd

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
TimeInput 180.1 kB (+267 B) · 17.8 kB CSS (+257 B) — — · — · —
DateTimeInput 231.2 kB (+254 B) · 20.6 kB CSS (+255 B) — — · — · —
FileInput 77.2 kB (+253 B) · 12.8 kB CSS (+252 B) — — · — · —
21 more components
Component Size LoC Visual · A11y · RTL
TextInput 101.0 kB (+234 B) · 12.8 kB CSS (+254 B) — — · — · —
Pagination 152.4 kB (+235 B) · 20.0 kB CSS (+247 B) — — · — · —
DateRangeInput 105.2 kB (+217 B) · 14.2 kB CSS (+257 B) — — · — · —
Typeahead 94.0 kB (+221 B) · 14.4 kB CSS (+252 B) — — · — · —
DateInput 207.3 kB (+218 B) · 18.9 kB CSS (+254 B) — — · — · —
NumberInput 105.9 kB (+214 B) · 13.0 kB CSS (+257 B) — — · — · —
MultiSelector 108.0 kB (+199 B) · 18.9 kB CSS (+269 B) — — · — · —
Selector 119.4 kB (+218 B) · 19.7 kB CSS (+250 B) — — · — · —
Tokenizer 112.0 kB (+222 B) · 21.9 kB CSS (+241 B) — — · — · —
PowerSearch 317.2 kB (+195 B) · 27.3 kB CSS (+222 B) — — · — · —
lab/Comments 387.5 kB (+252 B) · 2.5 kB CSS (0) — — · — · —
lab/CommentComposer 185.6 kB (+249 B) · 1.9 kB CSS (0) — — · — · —
lab/TransferList 138.8 kB (+244 B) · 1.2 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 126.9 kB (+242 B) · 773 B CSS (0) — — · — · —
lab/ChatReactionBar 128.1 kB (+215 B) · 1.1 kB CSS (0) — — · — · —
lab/CommentThread 380.4 kB (+189 B) · 2.4 kB CSS (0) — — · — · —
lab/EmojiPicker 120.6 kB (+187 B) · 751 B CSS (0) — — · — · —
lab/TransferListSelector 150.2 kB (+170 B) · 1.4 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 314.3 kB (+168 B) · 454 B CSS (0) — — · — · —
Field 60.8 kB (0) · 7.6 kB CSS (0) — ✓ · ✓ · —
FieldLabel 56.7 kB (0) · 6.1 kB CSS (0) — ✓ · ✓ · —

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

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


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The 24 px fine-pointer target behaves as described in the browser (top, bottom and end of the target hit the button; the text side stays the field's; touch is unchanged), but three things need fixing first:

  • Core's TypeScript build fails with TS2322 at InputClearButton.tsx:182 because the new '::after' block gives each property a media-conditional value, which StyleX's types allow only outside a pseudo-element; put the condition on a private custom property of the button and read it with var() in ::after.
  • Under a mouse the ::after covers the whole button and paints above the ×, so a theme's input-clear-icon :hover style no longer applies (the DateInput "Themed clear icon" and Selector "Themed icons" stories lose their hover colour); leave the button's own box to its content, for example with an even-odd clip-path hole like the touch band's.
  • The description says the unit test checks that the ::after does not grow toward the text, but the test only matches two source strings; add that assertion or credit the Chromium spec for it.

Non-blocking: the source-text assertions in the unit test can go once the browser spec covers the behaviour, and the new comment's first sentence restates height: '20px'.

Claims and files checked

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

  • Claim: every input-family clear button takes at least a 24 × 24 target under a mouse or pen. Verified: every field routes its clear button through this component, and browser probes in seven fields hit the button 1.5 px above and below and 3.5 px past the end.
  • Claim: the 20 px button looks the same. Verified at rest (resting frames are pixel-identical); on hover a themed glyph changes, see the second finding.
  • Claim: the extra target never grows toward the text, so a click at the end of the text places the caret. Verified: zero inline-start inset, and the point 1 px toward the text is the field's in left-to-right and right-to-left.
  • Claim: logical insets mirror in right-to-left. Verified in a right-to-left probe.
  • Claim: under a finger the shared touch band still grows the target, and the new pseudo-element is off there. Verified: it is not generated under a coarse pointer, and the band takes the same points as before.
  • Claim: the button had a 20 × 20 target before. Verified on the base.
  • Claim: no API change. Verified with the repository's API surface generator.
  • Claim: the unit test now checks that the pseudo-element is off under a coarse pointer and does not grow toward the text. False for the text side, see the third finding.
  • Claim: the Chromium spec checks the target's top, bottom and end, the text side, the 20 × 20 size and a caret click across six fields. Verified by reading the spec.
  • Claim: the unit tests pass 20/20 and ESLint is clean. Verified; the TypeScript build is what fails.
  • Claim: the governing records are the WCAG 2.2 AA baseline and the touch hit-area rule. Verified against the current records.
  • Claim: two overlapping open pull requests. Verified: both are open.
  • File packages/core/src/Field/InputClearButton.tsx: first and second findings; comment note.
  • File packages/core/src/Field/InputClearButton.test.tsx: third finding; source-text note.
  • File packages/core/src/Field/__tests__/InputClearButtonTarget.a11y.chromium.spec.ts: clear.
  • File .changeset/input-clear-button-target.md: clear.

Automated review (maintainer link)

growth: clearButtonGrowth,
};

// The glyph button is 20 px square. Under a coarse pointer, Button's shared

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 (comment style): "The glyph button is 20 px square." restates height: '20px' below. The rest carries the reasons; it could open with "Under a fine pointer this ::after grows the target to 24 px."

@cixzhang cixzhang removed the needs:design-review Affects visuals — Design should review label Nov 20, 2026
…over and types cleanly

A pseudo-element takes no media condition in a StyleX style passed to
Button, so the button now holds the conditions in private custom
properties and its ::after reads them. The ::after has an even-odd hole over
the button's own box (mirrored under :dir(rtl)), so a pointer on the glyph
reaches it and a theme's input-clear-icon hover applies again. The
Chromium spec checks that the button's centre reaches the glyph (red on the
previous revision in 7 of 8 cases) and adds a right-to-left case.
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 20, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 952aa59

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

Changes requested on one point. The follow-up fixes both earlier problems: Core's TypeScript build passes, and the clip-path hole leaves the × its own hover, so a theme's input-clear-icon hover colour applies again. In the browser the 24 px target behaves as described in left-to-right and right-to-left, and touch is unchanged.

  • The description says InputClearButton.test.tsx now checks that the fine-pointer ::after does not grow toward the text, but the test only matches two source strings (lines 244-250); add an assertion for the zero inline-start inset, or credit the Chromium spec's text-side probe in the description.

Non-blocking: the source-text assertions could go now that the browser spec covers the behaviour, and the comment's first sentence still restates height: '20px'.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0): none.
  • Claim: every input-family clear button takes at least a 24 × 24 target under a mouse or pen. Verified: every clearable field routes its clear button through this component without overriding its style, and browser probes in seven fields hit the button 1.5 px above and below the × and 3.5 px past its end, where the base gives those points to the field.
  • Claim: the 20 px button looks the same. Verified: resting and glyph-hover frames are pixel-identical to the base in twelve captures.
  • Claim: the extra target never grows toward the text, so a click at the end of the text places the caret. Verified: zero inline-start inset, and the point 1 px toward the text stays the field's in left-to-right and right-to-left.
  • Claim: logical insets mirror the target in right-to-left. Verified in right-to-left probes of two fields.
  • Claim: under a finger the shared touch band still grows the target, and the new pseudo-element is off there. Verified: it is not generated under a coarse pointer, and the band takes the same points as on the base.
  • Claim: the button had a 20 × 20 target before. Verified on the base.
  • Claim: no API change. Verified with the repository's API surface generator (no rows).
  • Claim: the unit test now checks that the pseudo-element is off under a coarse pointer and does not grow toward the text. False for the text side, see the finding above.
  • Claim: the Chromium spec checks the target's top, bottom and end, the text side, the 20 × 20 size and a caret click across six fields. Verified by reading the spec; it also checks that the glyph keeps its hit testing, and one right-to-left story.
  • Claim: the unit tests pass 20/20 and ESLint is clean. Verified, and Core's build now passes too.
  • Claim: the governing records are the WCAG 2.2 AA baseline and the rule that a hit-area expansion never overlaps a neighbour's target. Verified against the current records.
  • Claim: two overlapping pull requests are open. Verified: both are open.
  • File packages/core/src/Field/InputClearButton.tsx: clear; comment-style note.
  • File packages/core/src/Field/InputClearButton.test.tsx: the finding above (description claim); source-text note.
  • File packages/core/src/Field/__tests__/InputClearButtonTarget.a11y.chromium.spec.ts: clear.
  • File .changeset/input-clear-button-target.md: clear.

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 pending CI: CI has not run on this head yet, because the pull request is still a draft. The edited description now credits the text-side check to the Chromium spec, which settles the one remaining point. That spec passes at this head and fails on the base, so it guards the 24 px target, the text side and the glyph's own hover.

Non-blocking: the unit test's source-text assertions could go now that the browser spec covers the behaviour, and the comment's first sentence (InputClearButton.tsx:86) still restates height: '20px'.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules (0): none.
  • Claim (title): a 24 px target under a fine pointer, grown away from the text. Verified: InputClearButton.tsx:95-116, and the Chromium spec passes.
  • Claim: every input-family clear button takes at least 24 × 24 under a mouse or pen. Verified: every clearable field renders this component without overriding its style, the spec passes in six fields and right-to-left, and browser probes hit the button in seven fields.
  • Claim: the button had a 20 × 20 target before. Verified: on the base the spec's top, bottom and end points miss the button in all seven cases.
  • Claim: the 20 px button looks the same. Verified: the spec asserts 20 × 20, and resting and hover frames are pixel-identical to the base.
  • Claim: the extra target grows up, down and toward the end, never toward the text, so a click at the end of the text places the caret. Verified: zero inline-start inset (line 113), and the spec's text-side probe and caret click pass.
  • Claim: the pseudo-element extends 2 px up and down and 4 px toward the end with logical insets, so right-to-left mirrors it, covering 24 px on each axis. Verified: lines 112-114 and the right-to-left spec case.
  • Claim: the conditions sit on two private custom properties because a style passed to Button takes no condition inside a pseudo-element. Verified: the pointer condition is on the first property (line 107) and the direction condition on the hole property (line 108); conditions inside the pseudo-element failed the type check on the previous revision.
  • Claim: an even-odd clip-path hole over the button's box, mirrored in right-to-left, lets the glyph take the pointer, so a theme's icon hover applies in the two themed stories. Verified: lines 98-99 and 115, the spec's glyph check, and the themed hover matching the base in both stories.
  • Claim: under a coarse pointer the pseudo-element is off and the shared touch band still grows the target, so each pointer type has one hit area. Verified: the unset default at line 107 leaves no content, and touch probes match the base.
  • Claim: the unit test still requires the touch band and checks in the source that the pseudo-element is generated only outside a coarse pointer, while the text side is the browser spec's. Verified: test lines 232-250.
  • Claim: the Chromium spec checks the top, bottom and end hits, the text side, the 20 × 20 size, the glyph, right-to-left and the caret click. Verified by reading the spec.
  • Claim: on the previous revision 7 of the 8 cases fail the glyph check. Verified: the head's spec run against the previous revision fails exactly those 7 cases there.
  • Claim: the spec passes 8/8, twice. Verified: 16 of 16 with two repeats.
  • Claim: the unit tests pass 20/20, and Core's type check and ESLint are clean. Verified.
  • Claim: no API change. Verified with the repository's API surface generator (no rows).
  • Claim: the governing records are the WCAG 2.2 AA baseline including 2.5.8 and the rule that a hit-area expansion never overlaps a neighbour's target, with no record change. Verified against the current records.
  • Claim: two overlapping pull requests are open. Verified: both are open.
  • Claim (changeset): a core patch with the same target, appearance, text-side and touch claims. Verified by the same evidence.
  • File packages/core/src/Field/InputClearButton.tsx: clear; comment-style note.
  • File packages/core/src/Field/InputClearButton.test.tsx: clear; source-text note.
  • File packages/core/src/Field/__tests__/InputClearButtonTarget.a11y.chromium.spec.ts: clear.
  • File .changeset/input-clear-button-target.md: clear.

Automated review (maintainer link)

…ts private vars are registered

The touch-presentation guard admits '@media (pointer: fine)' and not
'@media not (pointer: coarse)', so the target keys on a fine primary pointer,
which is the case SC 2.5.8 asks for. The derived-var registry lists the two
private vars the button holds for its ::after, which are not a theme
surface.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 66e2f63

@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: the 24 px mouse target behaves as described at this head, with all eight cases of the new Chromium spec passing in CI, the unit, guard and registry tests passing, and an engineering owner's spec ruling covering this head.

CI is not green yet: two test-node shards failed on CLI tests this change does not touch (packed-gather-cache.npm-packed.test.mjs passes when re-run at this head and on the base, and the other shard was stopped by its time-limit watchdog with no failing test), so they need a re-run before merge.

Non-blocking, unchanged: the unit test's source-text assertions could go now that the browser spec covers the behavior, and the comment's first sentence (InputClearButton.tsx:86) restates height: '20px'.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules (0): none.
  • Claim (title and intent): a target of at least 24 × 24 under a mouse, trackpad or pen, grown away from the text. Verified: InputClearButton.tsx:95-116; on the head the top, bottom and end points of the 24 px target hit the button, on the base they fall to the field.
  • Claim: every input-family clear button had a 20 × 20 target and now takes at least 24 × 24, so a click just beside the glyph clears. Verified: the browser spec passes in six fields and right to left; points 2 px and 3.5 px past the end and 1.5 px above and below hit the button on the head; every listed field routes through this component (InputClearButton.tsx:11-16).
  • Claim: a click at the end of the text still places the caret, because the target never grows toward the text. Verified: zero inline-start inset (line 113), the text-side probe and the caret-click case.
  • Claim: the 20 px button looks the same. Verified: the spec asserts 20 × 20, and resting frames match the base pixel for pixel.
  • Claim: under a finger the shared touch band still grows the target. Verified: touch-emulated probes match the base, and the band code is untouched.
  • Claim: no API change. Verified: the API surface report lists no rows in any published package.
  • Claim: the pseudo-element extends 2 px up and down and 4 px toward the end with logical insets, so right-to-left mirrors it. Verified: lines 95-97 and 109-116, and the mirrored insets in the right-to-left probe.
  • Claim: the conditions sit on private custom properties because a style passed to Button takes no condition inside a pseudo-element. Verified: lines 105-108; conditions inside the pseudo-element failed the type check on an earlier revision.
  • Claim: an even-odd clip-path hole over the button's box, mirrored in right-to-left, lets the glyph take the pointer, so a theme's icon hover applies. Verified: lines 98-99, 108 and 115; the glyph centre hits the icon, and the themed hover colour in the DateInput themed-icon story matches the base.
  • Claim: under a coarse pointer the pseudo-element is off, so each pointer type has one hit area. Verified: the unset default at line 107 and content: none in the touch probe.
  • Claim: the registry test lists the two private variables as not a theme surface. Verified: derivedVarRegistry.test.ts:336-340.
  • Claim: the unit test still requires the band and checks in the source that the ring is generated only for a fine pointer, while the text side is the browser spec's. Verified: InputClearButton.test.tsx:224-249.
  • Claim: the browser spec checks the top, bottom and end hits, the text side, the 20 × 20 size, the glyph, right to left and the caret click. Verified by reading the spec.
  • Claim: on the previous revision 7 of the 8 cases fail the glyph check. Verified on that revision; the spec is unchanged since.
  • Claim: the browser spec passes 8 of 8, twice. Verified: 8 of 8 in CI at this head, and 16 of 16 with two repeats in an earlier run at this head.
  • Claim: build, type check, lint, the knowledge and changeset checks and the node tests passed at the previous head, and at this head the guard, registry and unit suites pass (202 tests). Verified at this head: 202 tests pass; CI's build, type check and lint pass; CI's node tests fail only on two CLI tests outside this change.
  • Claim: scoped browser specs pass. Verified at this head: CI's browser specs (167) and every interaction leg pass.
  • Claim: the unit tests pass 20 of 20, and the core type check and ESLint are clean. Verified.
  • Claim: the governing records are the WCAG 2.2 AA baseline including 2.5.8 and the rule that a hit-area expansion never overlaps a neighbour's target, with no record change. Verified against the current records.
  • Claim: two overlapping pull requests are open. Verified: both are open drafts.
  • Claim (changeset): a core patch with the same target, appearance, text-side and touch claims. Verified by the same evidence.
  • File packages/core/src/Field/InputClearButton.tsx: clear; comment-style note.
  • File packages/core/src/Field/InputClearButton.test.tsx: clear; source-text note.
  • File packages/core/src/Field/__tests__/InputClearButtonTarget.a11y.chromium.spec.ts: clear.
  • File packages/core/src/theme/derivedVarRegistry.test.ts: clear.
  • File .changeset/input-clear-button-target.md: clear.

Automated review (maintainer link)

@cixzhang cixzhang added the ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) label Nov 20, 2026
@cixzhang
cixzhang marked this pull request as ready for review November 20, 2026 23:34
@cixzhang
cixzhang marked this pull request as draft November 21, 2026 02:18
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 543fcfd

@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: CI passes on this head, including all eight cases of the new browser spec for the clear-button target.

The code is unchanged since the last review, and an engineering owner's spec ruling covers this head.

Non-blocking, unchanged: the unit test's source-text assertions could go now that the browser spec covers the behavior, and the comment's first sentence (InputClearButton.tsx:86) restates height: '20px'.

Claims and files checked

Review mode: same-head; reason: none

  • Claim (title and intent): a target of at least 24 × 24 under a mouse, trackpad or pen, grown away from the text. Verified: InputClearButton.tsx:95-116; the top, bottom and end points of the 24 px target hit the button on the head and fall to the field on the base.
  • Claim: every input-family clear button had a 20 × 20 target and now takes at least 24 × 24, so a click just beside the glyph clears. Verified: the browser spec covers six fields and right to left; points 2 px and 3.5 px past the end and 1.5 px above and below hit the button on the head; every listed field routes through this component (InputClearButton.tsx:11-16).
  • Claim: a click at the end of the text still places the caret, because the target never grows toward the text. Verified: zero inline-start inset (line 113), the text-side probe and the caret-click case.
  • Claim: the 20 px button looks the same. Verified: the spec asserts 20 × 20, resting frames match the base pixel for pixel, and CI's visual regression shows no changed shot.
  • Claim: under a finger the shared touch band still grows the target. Verified: touch-emulated probes match the base, and the band code is untouched.
  • Claim: no API change. Verified: the API surface report at this head lists no rows in any published package.
  • Claim: the pseudo-element extends 2 px up and down and 4 px toward the end with logical insets, so right-to-left mirrors it. Verified: lines 95-97 and 109-116, and the mirrored insets in the right-to-left probe.
  • Claim: the conditions sit on private custom properties because a style passed to Button takes no condition inside a pseudo-element. Verified: lines 105-108; conditions inside the pseudo-element failed the type check on an earlier revision.
  • Claim: an even-odd clip-path hole over the button's box, mirrored in right-to-left, lets the glyph take the pointer, so a theme's icon hover applies. Verified: lines 98-99, 108 and 115; the glyph centre hits the icon, and the themed hover colour matches the base.
  • Claim: under a coarse pointer the pseudo-element is off, so each pointer type has one hit area. Verified: the unset default at line 107 and content: none in the touch probe.
  • Claim: the registry test lists the two private variables as not a theme surface. Verified: derivedVarRegistry.test.ts:336-340.
  • Claim: the unit test still requires the band and checks in the source that the ring is generated only for a fine pointer, while the text side is the browser spec's. Verified: InputClearButton.test.tsx:224-249.
  • Claim: the browser spec checks the top, bottom and end hits, the text side, the 20 × 20 size, the glyph, right to left and the caret click. Verified by reading the spec.
  • Claim: on the previous revision 7 of the 8 cases fail the glyph check. Verified on that revision; the spec is unchanged since.
  • Claim: the browser spec passes 8 of 8, twice. Verified: 8 of 8 in CI at this head, and 16 of 16 with two repeats in an earlier run of this patch.
  • Claim: build, type check, lint, the knowledge and changeset checks and the node tests passed at an earlier revision, and the guard, registry and unit suites pass (202 tests). Verified: at this head CI's build, type check, lint and all nine node-test shards pass, and the three suites pass (202 tests).
  • Claim: scoped browser specs pass. Verified at this head: CI's browser specs (167) and every interaction leg pass.
  • Claim: the unit tests pass 20 of 20, and the core type check and ESLint are clean. Verified: 20 of 20 at this head; type check and lint pass in CI at this head.
  • Claim: the governing records are the WCAG 2.2 AA baseline including 2.5.8 and the rule that a hit-area expansion never overlaps a neighbour's target, with no record change. Verified against the current records; no record changes, and the 4 px end growth stays inside the field's 8 px gap before its next end part.
  • Claim: two overlapping pull requests are open. Verified: both are open drafts.
  • Claim (changeset): a core patch with the same target, appearance, text-side and touch claims. Verified by the same evidence.
  • File packages/core/src/Field/InputClearButton.tsx: clear; comment-style note.
  • File packages/core/src/Field/InputClearButton.test.tsx: clear; source-text note.
  • File packages/core/src/Field/__tests__/InputClearButtonTarget.a11y.chromium.spec.ts: clear.
  • File packages/core/src/theme/derivedVarRegistry.test.ts: clear.
  • File .changeset/input-clear-button-target.md: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 21, 2026 07:11
@cixzhang cixzhang added the lane:0 Astryx fix-loop lane 0 owns this label Nov 21, 2026
@cixzhang
cixzhang merged commit 0385dd4 into main Nov 21, 2026
157 checks passed
@github-actions
github-actions Bot deleted the fix/input-clear-button-target branch November 22, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 543fcfd4 Deployed Nov 21, 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. lane:0 Astryx fix-loop lane 0 owns this needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant