You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit de0bbc2
Browse filesBrowse the repository at this point in the historyBrowse files
fix(CheckboxListItem): a checked row reflects selected on its row targets (#10146)
* test(CheckboxListItem): a checked row reflects its selected state on its row targets (red)
* fix(CheckboxListItem): a checked row reflects selected on its row targets (FR15)
A checked, enabled, editable row already paints the checked-row fill; it now
also carries data-selected="selected" on the row element that holds its item
and list-item targets, so a theme can restyle checked rows and the text on
that fill. The record's FR15 gap closes.
* docs(CheckboxListItem): close OQ2; FR15's reflected selected state answers it
* docs(CheckboxList, CheckboxListItem): the summaries and the list record follow FR15's reflected selected state
[fix] A checked, enabled, editable `CheckboxListItem` row now reflects `data-selected="selected"` on its row, the element that carries its `item` and `list-item` targets, so a theme's `selected` rules for those targets restyle checked rows and the text on their fill.
| Public contract | One option row: a native checkbox named by `label` or `aria-label`, described by `description`, with optional `endContent`, rendered through ListItem. Inside a CheckboxList with a `value` array (collection mode), checked state comes from membership and `value` is required. Inside List, or inside a CheckboxList without `value` (standalone mode), the item reads `isChecked` and calls `onCheck`. |
57
57
| Behavior | The checkbox is the option's only tab stop. Row-surface clicks delegate to it when the item is editable and sits in a CheckboxList or has `onCheck`, or when it has `onClick`; an item `onClick` fires once per direct, keyboard, or row-surface click. Disabled, read-only, and busy states refuse toggling. |
58
58
| End-user impact | People can operate each option by pointer, touch, and keyboard, hear its name, description, and checked, mixed, disabled, read-only, or busy state, and see a spinner while it saves. |
59
-
| Builder impact | Where the item sits, and whether its parent list has `value`, selects the mode; `value` is required only in collection mode. Handlerless meaning, checked-row theming and pointer feedback, consumer DOM-prop targets, read-only click propagation, and focus-ring ownership stay open questions (OQ1–OQ6). |
60
-
| Compatibility/readiness |Records shipped behavior; no API, default, or DOM change. Handlerless items, checked-row state reflection, and the double focus indicator are listed under Current-state impact. |
59
+
| Builder impact | Where the item sits, and whether its parent list has `value`, selects the mode; `value` is required only in collection mode. Handlerless meaning, checked-row pointer feedback, consumer DOM-prop targets, read-only click propagation, and focus-ring ownership stay open questions (OQ1, OQ3–OQ6).|
60
+
| Compatibility/readiness |A checked, enabled, editable row reflects `selected` (FR15); no APIor default change. Handlerless itemsand the double focus indicator are listed under Current-state impact.|
61
61
| Review checks | Reject a second tab stop, a toggle while disabled, read-only, or busy, `isChecked` overriding a parent `value` array, an `onClick` that fires more than once per click, a dropped description relationship, or a new target, state, or event-routing API introduced without an owner decision. |
@@ -143,7 +143,7 @@ Consumer migration instructions belong in consumer docs and release notes.
143
143
| FR12 | An enabled, editable, checked row MUST paint the `--color-accent-muted` fill, and consumer `xstyle` MUST compose after it. | shipped source and the Chromium accessibility suite |
144
144
| FR13 |`ref`, `className`, `style`, `xstyle`, data attributes, ARIA other than `aria-label`, and events other than `onClick` MUST reach the row `<li>`. | shipped source and focused tests |
145
145
| FR14 | A standalone item with `isChecked` and no `onCheck` changes nothing on activation. Implementation gap: it declares no read-only state, so the checkbox is exposed as editable (WCAG 2.2 4.1.2); inside a CheckboxList without `value`, its row also delegates clicks and shows pointer feedback. Its meaning is OQ1. | exact `spec:AST-021` known failure `list-item-handlerless-read-only`; WCAG 4.1.2 |
146
-
| FR15 |The item paints the checked-row fill itself and reflects no selection state on the row's `list-item`or `item` targets, so a theme cannot restyle checked rows apart from unchecked rows (OQ2). Selection state MUST be reflected on the owning target (`architecture:component-theming-surface` INV6). Implementation gap: no selection state is reflected. |`architecture:component-theming-surface/INV6`|
146
+
| FR15 |A checked, enabled, editable row paints the checked-row fill and reflects a `selected` state on the row's `item`and `list-item` targets, so a theme can restyle checked rows and the text on that fill (`architecture:component-theming-surface` INV6). A read-only or disabled row paints no fill and reflects no state; its targets match unchecked rows. |`architecture:component-theming-surface/INV6`|
147
147
| FR16 | Shipped behavior, not a requirement until its open question is ruled: consumer DOM inputs split between two elements: data attributes and ARIA reach the row, while `onClick` runs on the checkbox and is typed for the row, so `event.currentTarget` is the checkbox and does not carry the row's data attributes (OQ3). |`architecture:public-component-api/INV5`; `INV9` for any retype or move |
148
148
| FR17 | Shipped behavior, not a requirement until its open question is ruled: on a read-only item with `onClick`, the item stops the click's propagation, so React ancestors never receive those clicks, while they do for enabled items (OQ4). The item's own `onClick` still fires once per click (FR10). | Current source; shared clickable-container hook behavior |
149
149
| FR18 | Shipped behavior, not a requirement until its open question is ruled: on an enabled, editable, checked row, the checked-row fill replaces the row's hover and pressed overlays, so pointer hover and hold give no row feedback (OQ5). | the Chromium accessibility suite; `design:user-states` leaves hover and selection treatment outside its current claim |
@@ -215,7 +215,7 @@ durable constraints and their verification target.
215
215
| Option row | Full-width row with start checkbox, label and description, and end content. | List and Item | Supporting | FR1, FR9, FR13 |
216
216
| Checkbox | Presents the option's selection indicator. | CheckboxInput owner and `design:user-states` for its press | Prominent | FR1, FR6–FR8, FR11 |
217
217
| Label, description | Name and describe the checkbox. | Item | Primary content | FR2, FR3 |
218
-
| Checked-row fill | Supplements the checkbox state on enabled, editable checked rows. |unsettled (FR15, FR18) | Supporting | FR12 |
218
+
| Checked-row fill | Supplements the checkbox state on enabled, editable checked rows. |row `selected` state (FR15); FR18 open| Supporting | FR12 |
219
219
| Spinner | Replaces the mark while the option is busy. | Spinner | Supporting | FR7 |
220
220
221
221
This record carries no anatomy-theming map. The composed option anatomy and its
@@ -256,7 +256,8 @@ and CheckboxListItem owns no target of its own.
256
256
| FR12, FR18 |`CheckboxList.a11y.chromium.spec.ts``checked`, `hover-*`, and `pressed-*` cases | Light and dark; unchecked and checked | A missing or misplaced fill fails the row-paint check. Evidence gap: no assertion that `xstyle` composes after the fill. |`audit:CheckboxListItem/visual`|
257
257
| FR13, FR16 |`CheckboxList.test.tsx` ref and styling, data-testid, and ARIA cases | Row ref, class, style, data, ARIA | A dropped or misrouted input fails. Evidence gap: no test asserts `event.currentTarget` for `onClick` (FR16). |`audit:CheckboxListItem/api`|
258
258
| FR14 |`Checkbox.a11y.test.tsx` known failure `list-item-handlerless-read-only`; `CheckboxList.a11y.chromium.spec.ts``handlerless` case | Standalone with `isChecked` and no `onCheck`| The recorded known failure stops matching when its gap closes. |`audit:CheckboxListItem/accessibility`|
259
-
| FR15, FR19, AR5 |`CheckboxList.a11y.chromium.spec.ts``focus-visible` and `forced-colors-focus` cases | Keyboard focus; forced colors | A lost focus indicator fails. Evidence gap: no test asserts the absent selection state (FR15) or counts focus indicators (FR19). |`audit:CheckboxListItem/visual`|
259
+
| FR15 |`CheckboxList.test.tsx` checked-row state case | checked, unchecked, read-only and disabled rows | A checked, enabled, editable row without `selected` on its row targets fails; a read-only or disabled row with it fails | current source |
260
+
| FR19, AR5 |`CheckboxList.a11y.chromium.spec.ts``focus-visible` and `forced-colors-focus` cases | Keyboard focus; forced colors | A lost focus indicator fails. Evidence gap: no test counts focus indicators (FR19). |`audit:CheckboxListItem/visual`|
260
261
| Direction | RTL audit target `core-checkboxlist--rich-descriptions` (`apps/storybook/rtl-audit/targets.json`); `CheckboxList.a11y.chromium.spec.ts``rtl` case | LTR and RTL | The checkbox and end content fail to swap inline order. |`audit:CheckboxListItem/layout`|
261
262
| ORD1–ORD4, PR1 | Covered by the FR4–FR10 and FR13 rows. Evidence gap: no test asserts the absence of observers, timers, or global listeners | — | — |`audit:CheckboxListItem/behavior`|
262
263
@@ -269,8 +270,6 @@ and CheckboxListItem owns no target of its own.
269
270
-**Mixed state after activation (FR5).** A standalone mixed item whose value
270
271
stays mixed loses its native mixed state on activation, as
271
272
`component:CheckboxInput` records.
272
-
-**Checked-row state (FR15).** No selection state is reflected on the row
273
-
targets, against `architecture:component-theming-surface` INV6.
274
273
-**Two focus indicators (FR19).** Keyboard focus paints both the row outline
275
274
and the checkbox ring, against `architecture:interaction-modality` INV3.
276
275
@@ -284,8 +283,6 @@ No component-local decision. CheckboxListItem applies `spec:AST-021` and
284
283
-**OQ1 — What does a standalone item with `isChecked` and no `onCheck`
285
284
mean?** (`human-api`) Choose read-only, unavailable, or invalid usage,
286
285
consistent with the matching CheckboxInput question.
287
-
-**OQ2 — How should a theme reach the checked-row fill?** (`human-api`)
288
-
Exposing it needs a target or reflected-state decision.
289
286
-**OQ3 — Which element owns consumer DOM inputs?** (`human-api`) Data and ARIA
290
287
reach the row while `onClick` runs on the checkbox under a row-typed handler.
291
288
-**OQ4 — Should read-only item clicks propagate?** (`human-api`) No current
0 commit comments