Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/selection-touch-targets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astryxdesign/core': patch
---

[feat] Under a finger, a labelled CheckboxInput and each RadioList option get an invisible hit area. It grows toward 44 px, never makes the target smaller than the control’s own box, and stops at half the gap to a closer neighbour, so neighbouring targets never overlap. Nothing changes size. Under a finger a RadioListItem row’s `::after` is that hit area, so decorate a row with a child. A label-hidden checkbox inside another component’s row keeps that row’s target. With a mouse or trackpad nothing changes.

@vjeux
5 changes: 3 additions & 2 deletions docs/specs/AST-094-touch-presentations/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,9 @@ under a finger, and a mouse follows `module:DropdownMenu/useMenuPress` FR3 and
that grows only with its text, such as a Button whose label follows the
16 px reading base:
the 16 px mobile reading base (`design:mobile-typography` DR1, DR3) and the
16 px text-entry floor (`family:input-fields` FR9) are unaffected. Under a
coarse pointer, touch targets meet 44 px through an invisible hit area. A
16 px text-entry floor (`family:input-fields` FR9) are unaffected.
Under a coarse pointer, the touch target grows toward 44 × 44 px, up to halfway to a neighboring target, and is never smaller than the control's own box (owner decision, 2026-11-04; `spec:AST-094` FR42).
It grows through an invisible hit area. A
hit-area expansion never overlaps a neighboring interactive element's own
target: where neighbors are closer than 44 px, the expansion is clamped to
half the gap, or skipped, so each element stays reachable; an expansion a
Expand Down
4 changes: 4 additions & 0 deletions docs/specs/components/CheckboxInput/CheckboxInput.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ verified_by:
packages/core/src/CheckboxInput/__tests__/Checkbox.a11y.chromium.spec.ts,
packages/core/src/theme/themingTargets.test.ts,
packages/core/src/__tests__/BusyOwnerAnnouncement.test.tsx,
packages/core/src/Indicator/touchTarget.test.tsx,
packages/core/src/Indicator/__tests__/TouchTargets.interaction.browser.spec.ts,
]
modules: []
families: []
Expand Down Expand Up @@ -118,6 +120,7 @@ Consumer migration instructions belong in consumer docs and release notes.
| FR11 | CheckboxInput applies `design:user-states` DR1 and DR2 for the pressed overlay, painting it on the indicator while the row is pressed, except over an indicator that paints its own press (AV1). | `design:user-states/DR1–DR5` |
| FR12 | `sm` and `md` MUST keep the native input, indicator, focus paint, and row geometry aligned; field `width` MUST size the whole field rather than only the input. | shipped source, tests, and stories |
| FR13 | With neither `onChange` nor `changeAction`, activation changes nothing the caller can observe. Implementation gap: the checkbox declares no read-only or unavailable state; its meaning is OQ1 (Current-state impact). | shared checkbox known-failure record |
| FR14 | Under a coarse pointer, the touch target grows toward 44 × 44 px, up to halfway to a neighboring target, and is never smaller than the control's own box (owner decision, 2026-11-04; `spec:AST-094` FR42). It grows through an invisible band on a labelled, enabled, editable checkbox's row, and nothing changes size. A label-hidden checkbox keeps its composer's target. | `spec:AST-094` FR42; current source and tests |

### Allowed variation

Expand Down Expand Up @@ -190,6 +193,7 @@ The consumer record includes composed targets owned by CheckboxIndicator, FieldL
| FR10, AR3 | `CheckboxInput.test.tsx` focus-ring ownership suite | Built-in and prop-dropping replacement indicators; blur | A ring on the wrong element, or none, fails. | `audit:CheckboxInput/a11y` |
| FR11 | `CheckboxInput.test.tsx` pressed-state suite and its suite for an indicator that paints its own press | Enabled press; disabled; touch fade | A missing overlay, or one on a disabled box, fails. | `audit:CheckboxInput/visual` |
| FR12, AR5 | `CheckboxInput.test.tsx` coarse-pointer, RTL, and forced-colors suites | `sm`, `md`; RTL; forced colors | A misplaced hit target or a mark lost in forced colors fails. Evidence gap: no test asserts field `width`. | `audit:CheckboxInput/layout` |
| FR14 | `touchTarget.test.tsx` hit-band, band-press and minimum cases; `TouchTargets.interaction.browser.spec.ts` checkbox cases | Labelled, label-hidden, disabled and read-only; 24 and 60 px rows; a finger, a tap whose click lands on the row's edge, and a mouse | A band where none belongs, a band under a mouse, a row that changes size, a 24 px row short of 44 px, a 60 px row with a band, or a band press that does not toggle fails. | `audit:CheckboxInput/behavior` |
| ORD1–ORD4, PR1 | ORD4 is covered by the FR8 rest-precedence case and ORD3 by the shared accessibility suite's disabled, disabled-reason, and read-only states. Evidence gap: no test asserts the optimistic value between `value` and the indicator (ORD1), the `preventDefault` check before `changeAction` (ORD2), or the absence of global listeners | — | — | `audit:CheckboxInput/behavior` |

## Current-state impact
Expand Down
4 changes: 4 additions & 0 deletions docs/specs/components/RadioList/RadioListItem.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ verified_by:
packages/core/src/RadioList/__tests__/RadioGroup.a11y.test.tsx,
packages/core/src/RadioList/__tests__/RadioGroup.a11y.chromium.spec.ts,
apps/storybook/rtl-audit/targets.json,
packages/core/src/Indicator/touchTarget.test.tsx,
packages/core/src/Indicator/__tests__/TouchTargets.interaction.browser.spec.ts,
]
modules: []
families: []
Expand Down Expand Up @@ -124,6 +126,7 @@ Consumer migration instructions belong in consumer docs and release notes.
| FR10 | Under forced colors, the selected dot stays visible. | WCAG 1.4.11; current tests |
| FR11 | The painted row element carries `astryx-radio-list-item` (alongside Item's own target) and reflects `data-size`, `data-selected` when checked, and `data-disabled` when disabled. A theme's `radio-list-item` styles override the bare default row. | `architecture:component-theming-surface` INV6; current tests |
| FR12 | `ref`, `className`, `style`, `xstyle`, `align`, `data-*`, `id`, and ARIA other than `aria-label` reach the row. | Current tests |
| FR13 | Under a coarse pointer, the touch target grows toward 44 × 44 px, up to halfway to a neighboring target, and is never smaller than the control's own box (owner decision, 2026-11-04; `spec:AST-094` FR42). It grows through an invisible band on an enabled option's row, and the row keeps its size. | `spec:AST-094` FR42; current source and tests |

### Allowed variation

Expand Down Expand Up @@ -188,6 +191,7 @@ No design record beyond `design:user-states` governs RadioListItem.
| FR8 | `RadioList.test.tsx` pressed-state and bare-row cases; `RadioListItem.press.source-build.test.mjs` | Enabled, disabled, touch | Press paint on a disabled option, or a default row background, fails. Evidence gap: no test asserts the hover tint. | `audit:RadioListItem/visual` |
| FR9, FR10, AR3, AR4 | `RadioList.test.tsx` coarse-pointer, RTL, and forced-colors cases | Coarse pointer; RTL; forced colors | Evidence gap: the forced-colors case passes on any matching rule (the checkbox mark supplies one), so it does not prove the dot; the coarse-pointer and RTL cases check only the direction-symmetric centering class, not the 24 by 24 minimum or RTL placement. | `audit:RadioListItem/accessibility` |
| FR11, FR12 | `RadioList.test.tsx` theme-target and rest-forwarding cases | Sizes; selected; disabled | A target off the painted row, or a missing state, fails. Evidence gap: no test asserts `ref`, `className`, `style`, or `xstyle` on the row. | `audit:RadioListItem/theming` |
| FR13 | `touchTarget.test.tsx` hit-band and minimum cases; `TouchTargets.interaction.browser.spec.ts` RadioList and mouse cases | Enabled and disabled; both orientations; 24 and 60 px; a mouse | A band on a disabled option, a band under a mouse, a row or gap that changes size, a band past half the gap, a 24 px row short of 44 px, or a 60 px row with a band fails. | `audit:RadioListItem/behavior` |
| PR1 | Evidence gap: no test asserts the absence of observers or global listeners | — | — | `audit:RadioListItem/behavior` |
| RTL relation | RTL audit curated D2 target (`apps/storybook/rtl-audit/targets.json`) on `RadioList / Default` | Indicator and label; LTR and RTL | An indicator that is not at the inline start of its label fails D2. | `audit:RadioListItem/i18n-rtl` |

Expand Down
5 changes: 3 additions & 2 deletions packages/core/src/CheckboxInput/CheckboxInput.doc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const docs = {
name: 'size',
type: "'sm' | 'md'",
description:
'The size of the checkbox. sm for compact layouts, md for default.',
'The size of the checkbox. sm for compact layouts, md for default. Under a coarse pointer a labelled checkbox’s target grows toward 44 px through an invisible hit area. It never shrinks below the row and stops at half the gap to a closer neighbour; nothing changes size.',
default: "'md'",
},
{
Expand Down Expand Up @@ -361,7 +361,8 @@ export const docsZh = {
{
name: 'size',
type: "'sm' | 'md'",
description: '复选框尺寸。sm 用于紧凑布局,md 为默认。',
description:
'复选框尺寸。sm 用于紧凑布局,md 为默认。在粗指针(触摸)下,带可见标签的复选框的目标通过不可见的点击区域向 44 px 扩展。它不小于所在行,与相邻控件较近时止于间距的一半;尺寸不变。',
default: "'md'",
},
{
Expand Down
Loading
Loading