@slotted/react 0.1.0-beta.29 → 0.1.0-beta.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{app-shell-CXlO6z0w.js → app-shell-ClwskWBN.js} +1 -1
- package/dist/app-shell.js +2 -2
- package/dist/docs/AGENTS.snippet.md +1 -1
- package/dist/docs/accordion.json +5 -5
- package/dist/docs/accordion.md +11 -11
- package/dist/docs/action-bar.json +19 -19
- package/dist/docs/action-bar.md +29 -29
- package/dist/docs/action-sheet.json +5 -5
- package/dist/docs/action-sheet.md +15 -15
- package/dist/docs/alert.json +11 -11
- package/dist/docs/alert.md +17 -17
- package/dist/docs/app-shell.examples.md +8 -8
- package/dist/docs/app-shell.json +11 -11
- package/dist/docs/app-shell.md +2 -2
- package/dist/docs/attachment.json +1 -1
- package/dist/docs/attachment.md +1 -1
- package/dist/docs/avatar-group.json +1 -1
- package/dist/docs/avatar-group.md +1 -1
- package/dist/docs/avatar.json +10 -10
- package/dist/docs/avatar.md +9 -9
- package/dist/docs/badge.json +5 -5
- package/dist/docs/badge.md +5 -5
- package/dist/docs/breadcrumb.json +2 -2
- package/dist/docs/breadcrumb.md +2 -2
- package/dist/docs/button-group.json +1 -1
- package/dist/docs/button-group.md +1 -1
- package/dist/docs/button.json +11 -11
- package/dist/docs/button.md +7 -7
- package/dist/docs/calendar.json +4 -4
- package/dist/docs/calendar.md +3 -3
- package/dist/docs/card.json +2 -2
- package/dist/docs/card.md +2 -2
- package/dist/docs/carousel.json +11 -11
- package/dist/docs/carousel.md +12 -12
- package/dist/docs/chart.examples.md +41 -41
- package/dist/docs/chart.json +28 -28
- package/dist/docs/chart.md +4 -4
- package/dist/docs/checkbox-group.examples.md +12 -12
- package/dist/docs/checkbox-group.json +6 -6
- package/dist/docs/checkbox-group.md +1 -1
- package/dist/docs/checkbox.examples.md +8 -8
- package/dist/docs/checkbox.json +7 -7
- package/dist/docs/checkbox.md +4 -4
- package/dist/docs/code-block.json +1 -1
- package/dist/docs/code-block.md +1 -1
- package/dist/docs/collapsible.json +12 -12
- package/dist/docs/collapsible.md +21 -21
- package/dist/docs/color-picker.json +25 -25
- package/dist/docs/color-picker.md +15 -15
- package/dist/docs/column-manager.json +1 -1
- package/dist/docs/column-manager.md +1 -1
- package/dist/docs/combobox.json +1 -1
- package/dist/docs/combobox.md +1 -1
- package/dist/docs/context-menu.json +1 -1
- package/dist/docs/context-menu.md +1 -1
- package/dist/docs/currency-field.examples.md +1 -1
- package/dist/docs/currency-field.json +5 -5
- package/dist/docs/currency-field.md +4 -4
- package/dist/docs/dashboard-grid.json +1 -1
- package/dist/docs/data-grid.json +2 -2
- package/dist/docs/data-grid.md +1 -1
- package/dist/docs/data-grid.props.md +1 -1
- package/dist/docs/date-field.json +4 -4
- package/dist/docs/date-field.md +9 -9
- package/dist/docs/date-picker.json +1 -1
- package/dist/docs/date-range-picker.json +1 -1
- package/dist/docs/datetime-field.json +3 -3
- package/dist/docs/datetime-field.md +7 -7
- package/dist/docs/datetime-picker.json +1 -1
- package/dist/docs/datetime-range-picker.examples.md +2 -2
- package/dist/docs/datetime-range-picker.json +3 -3
- package/dist/docs/datetime-range-picker.md +2 -2
- package/dist/docs/description-list.json +5 -5
- package/dist/docs/description-list.md +4 -4
- package/dist/docs/detail-panel.json +9 -9
- package/dist/docs/detail-panel.md +11 -11
- package/dist/docs/dialog.examples.md +5 -5
- package/dist/docs/dialog.json +12 -12
- package/dist/docs/dialog.md +4 -4
- package/dist/docs/dialog.props.md +2 -2
- package/dist/docs/drawer.examples.md +14 -14
- package/dist/docs/drawer.json +8 -8
- package/dist/docs/drawer.md +1 -1
- package/dist/docs/entity-picker.json +1 -1
- package/dist/docs/entity-picker.md +2 -2
- package/dist/docs/event-calendar.examples.md +3 -3
- package/dist/docs/event-calendar.json +5 -5
- package/dist/docs/event-calendar.md +2 -2
- package/dist/docs/field-group.json +5 -5
- package/dist/docs/field-group.md +9 -9
- package/dist/docs/field.examples.md +3 -3
- package/dist/docs/field.json +4 -4
- package/dist/docs/field.md +1 -1
- package/dist/docs/form.json +6 -6
- package/dist/docs/form.md +10 -10
- package/dist/docs/fullscreen.json +3 -3
- package/dist/docs/fullscreen.md +6 -6
- package/dist/docs/guidelines/async-feedback.md +2 -2
- package/dist/docs/guidelines/builders.md +1 -1
- package/dist/docs/guidelines/composition.md +4 -4
- package/dist/docs/guidelines/conversations.md +1 -1
- package/dist/docs/guidelines/index.md +2 -2
- package/dist/docs/guidelines/layout-alignment.md +5 -5
- package/dist/docs/guidelines/overviews.md +3 -3
- package/dist/docs/guidelines/own-elements.md +7 -7
- package/dist/docs/guidelines/record-pages.md +1 -1
- package/dist/docs/highlight.json +11 -11
- package/dist/docs/highlight.md +18 -18
- package/dist/docs/icon.json +2 -2
- package/dist/docs/icon.md +2 -2
- package/dist/docs/image.json +3 -3
- package/dist/docs/image.md +3 -3
- package/dist/docs/import-export-center.json +25 -25
- package/dist/docs/import-export-center.md +21 -21
- package/dist/docs/inline-message.json +14 -14
- package/dist/docs/inline-message.md +20 -20
- package/dist/docs/inline.json +1 -1
- package/dist/docs/inline.md +1 -1
- package/dist/docs/kbd.json +2 -2
- package/dist/docs/kbd.md +2 -2
- package/dist/docs/link.json +7 -7
- package/dist/docs/link.md +7 -7
- package/dist/docs/list-item.json +1 -1
- package/dist/docs/list-item.md +1 -1
- package/dist/docs/list.json +2 -2
- package/dist/docs/list.md +1 -1
- package/dist/docs/listbox.json +1 -1
- package/dist/docs/listbox.md +1 -1
- package/dist/docs/loading-overlay.json +2 -2
- package/dist/docs/loading-overlay.md +2 -2
- package/dist/docs/media-viewer.json +1 -1
- package/dist/docs/media-viewer.md +1 -1
- package/dist/docs/message-scroller.json +1 -1
- package/dist/docs/message-scroller.md +1 -1
- package/dist/docs/message.json +11 -11
- package/dist/docs/message.md +17 -17
- package/dist/docs/multi-select.json +1 -1
- package/dist/docs/notification-center.json +18 -18
- package/dist/docs/notification-center.md +25 -22
- package/dist/docs/number-field.examples.md +4 -4
- package/dist/docs/number-field.json +3 -3
- package/dist/docs/otp-input.json +9 -9
- package/dist/docs/otp-input.md +12 -12
- package/dist/docs/page-header.json +9 -9
- package/dist/docs/page-header.md +23 -23
- package/dist/docs/pagination.json +2 -2
- package/dist/docs/pagination.md +1 -1
- package/dist/docs/popover.examples.md +1 -1
- package/dist/docs/popover.json +3 -3
- package/dist/docs/popover.md +1 -1
- package/dist/docs/progress-indicator.json +4 -4
- package/dist/docs/progress-indicator.md +4 -4
- package/dist/docs/prompt-composer.json +3 -3
- package/dist/docs/prompt-composer.md +4 -4
- package/dist/docs/prose.json +1 -1
- package/dist/docs/prose.md +1 -1
- package/dist/docs/radio-group.examples.md +16 -16
- package/dist/docs/radio-group.json +9 -9
- package/dist/docs/radio-group.md +2 -2
- package/dist/docs/rating.json +18 -18
- package/dist/docs/rating.md +19 -23
- package/dist/docs/result-state.json +13 -13
- package/dist/docs/result-state.md +18 -20
- package/dist/docs/saved-views.json +1 -1
- package/dist/docs/scroll-area.json +5 -5
- package/dist/docs/scroll-area.md +6 -6
- package/dist/docs/section.json +6 -6
- package/dist/docs/section.md +11 -11
- package/dist/docs/segmented-control.json +15 -15
- package/dist/docs/segmented-control.md +39 -39
- package/dist/docs/skeleton.json +1 -1
- package/dist/docs/skeleton.md +1 -1
- package/dist/docs/skills/build-own-element/SKILL.md +3 -3
- package/dist/docs/skills/compose-screen/SKILL.md +2 -2
- package/dist/docs/skills/index.md +2 -2
- package/dist/docs/skills/review-screen/SKILL.md +3 -3
- package/dist/docs/skills/theme-app/SKILL.md +9 -9
- package/dist/docs/skills/waiting-states/SKILL.md +1 -1
- package/dist/docs/slider.json +9 -9
- package/dist/docs/slider.md +19 -19
- package/dist/docs/sparkline.json +8 -8
- package/dist/docs/sparkline.md +6 -6
- package/dist/docs/split-button.json +11 -11
- package/dist/docs/split-button.md +27 -27
- package/dist/docs/stack.json +1 -1
- package/dist/docs/stack.md +1 -1
- package/dist/docs/stat-card.json +3 -3
- package/dist/docs/stat-card.md +2 -2
- package/dist/docs/status-indicator.json +8 -8
- package/dist/docs/status-indicator.md +5 -5
- package/dist/docs/stepper.json +4 -4
- package/dist/docs/stepper.md +4 -4
- package/dist/docs/switch.json +5 -5
- package/dist/docs/switch.md +11 -7
- package/dist/docs/table-of-contents.json +9 -9
- package/dist/docs/table-of-contents.md +13 -13
- package/dist/docs/table.examples.md +1 -1
- package/dist/docs/table.json +1 -1
- package/dist/docs/tabs.json +1 -1
- package/dist/docs/tabs.md +1 -1
- package/dist/docs/tag.json +21 -21
- package/dist/docs/tag.md +18 -18
- package/dist/docs/tags-input.json +1 -1
- package/dist/docs/tags-input.md +1 -1
- package/dist/docs/text-field.examples.md +5 -5
- package/dist/docs/text-field.json +5 -5
- package/dist/docs/text-field.md +1 -1
- package/dist/docs/textarea.examples.md +4 -4
- package/dist/docs/textarea.json +2 -2
- package/dist/docs/time-field.json +3 -3
- package/dist/docs/time-field.md +7 -7
- package/dist/docs/time-picker.json +4 -4
- package/dist/docs/time-picker.md +7 -7
- package/dist/docs/time-range-picker.json +4 -4
- package/dist/docs/time-range-picker.md +5 -5
- package/dist/docs/toast.json +5 -5
- package/dist/docs/toast.md +5 -5
- package/dist/docs/toggle-group.json +13 -13
- package/dist/docs/toggle-group.md +38 -38
- package/dist/docs/toggle.json +8 -8
- package/dist/docs/toggle.md +8 -8
- package/dist/docs/tokens.md +15 -15
- package/dist/docs/toolbar.json +11 -11
- package/dist/docs/toolbar.md +28 -28
- package/dist/docs/tooltip.json +3 -3
- package/dist/docs/tooltip.md +3 -3
- package/dist/docs/top-navigation.examples.md +13 -13
- package/dist/docs/top-navigation.json +10 -10
- package/dist/docs/top-navigation.md +7 -7
- package/dist/docs/tour.json +8 -8
- package/dist/docs/tour.md +5 -5
- package/dist/docs/typography.json +2 -2
- package/dist/docs/typography.md +2 -2
- package/dist/docs/upload.examples.md +5 -5
- package/dist/docs/upload.json +10 -10
- package/dist/docs/upload.md +3 -3
- package/dist/{form-Im9lGi45.js → form-DnV8ndwm.js} +1 -1
- package/dist/form.js +1 -1
- package/dist/index.js +8 -8
- package/dist/{rating-Cjrwmxyw.js → rating-BtrkTAi0.js} +1 -1
- package/dist/rating.js +1 -1
- package/dist/{side-navigation-CvIGfGjZ.js → side-navigation-DNMpckRs.js} +1 -1
- package/dist/side-navigation.js +1 -1
- package/dist/{slider-DuJGh0pf.js → slider-CU89H3i0.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/styles/app-shell.css +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/styles/side-navigation.css +1 -1
- package/dist/styles/top-navigation.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/{top-navigation-D_Jt0jNw.js → top-navigation-C73WDqLg.js} +1 -1
- package/dist/top-navigation.js +1 -1
- package/dist/types/alert/alert.types.d.ts +2 -2
- package/dist/types/alert/alert.types.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell-demo/atrio.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell-demo/aurora.d.ts +6 -6
- package/dist/types/app-shell/app-shell-demo/aurora.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell-demo/cadence.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell-parts.d.ts +2 -2
- package/dist/types/app-shell/app-shell.types.d.ts +1 -1
- package/dist/types/app-shell/index.d.ts +2 -2
- package/dist/types/avatar/avatar.types.d.ts +8 -8
- package/dist/types/avatar/avatar.types.d.ts.map +1 -1
- package/dist/types/badge/badge.types.d.ts +4 -4
- package/dist/types/badge/badge.types.d.ts.map +1 -1
- package/dist/types/breadcrumb/breadcrumb-parts.d.ts +1 -1
- package/dist/types/button/button.constants.d.ts +1 -1
- package/dist/types/button-group/button-group-separator.d.ts +1 -1
- package/dist/types/card/card-selection.d.ts +1 -1
- package/dist/types/carousel/carousel-catalogue.d.ts +6 -6
- package/dist/types/carousel/carousel-parts.d.ts +2 -2
- package/dist/types/code-block/code-block.types.d.ts +1 -1
- package/dist/types/collapsible/collapsible.types.d.ts +1 -1
- package/dist/types/color-picker/color-picker.d.ts +7 -7
- package/dist/types/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/color-picker/color-picker.types.d.ts +5 -5
- package/dist/types/color-picker/color-picker.types.d.ts.map +1 -1
- package/dist/types/column-manager/column-manager.d.ts +2 -2
- package/dist/types/column-manager/column-manager.d.ts.map +1 -1
- package/dist/types/combobox/combobox-collection.d.ts +1 -1
- package/dist/types/combobox/combobox-defaults.d.ts +1 -1
- package/dist/types/command-palette/command-palette-defaults.d.ts +1 -1
- package/dist/types/data-grid/data-grid-context.d.ts +2 -2
- package/dist/types/description-list/description-list-clipboard.d.ts +1 -1
- package/dist/types/detail-panel/detail-panel-demo.d.ts.map +1 -1
- package/dist/types/dialog/dialog.types.d.ts +1 -1
- package/dist/types/drawer/drawer.types.d.ts +1 -1
- package/dist/types/entity-picker/entity-picker.d.ts +1 -1
- package/dist/types/field/field-parts.d.ts +1 -1
- package/dist/types/field/field.d.ts +1 -1
- package/dist/types/field/field.types.d.ts +1 -1
- package/dist/types/form/form.d.ts +1 -1
- package/dist/types/form/form.types.d.ts +1 -1
- package/dist/types/highlight/highlight.types.d.ts +1 -1
- package/dist/types/icon/glyph.d.ts +1 -1
- package/dist/types/icon/icon.d.ts +2 -2
- package/dist/types/icon/icon.types.d.ts +1 -1
- package/dist/types/icon/icon.types.d.ts.map +1 -1
- package/dist/types/image/image.d.ts +1 -1
- package/dist/types/import-export-center/import-export-center-defaults.d.ts +3 -3
- package/dist/types/import-export-center/import-export-center-demo.d.ts +2 -2
- package/dist/types/import-export-center/import-export-center-demo.d.ts.map +1 -1
- package/dist/types/import-export-center/import-export-center.types.d.ts +3 -3
- package/dist/types/import-export-center/use-job-toasts.d.ts +3 -3
- package/dist/types/inline/inline.d.ts +1 -1
- package/dist/types/inline-message/inline-message-defaults.d.ts +1 -1
- package/dist/types/inline-message/inline-message.d.ts +2 -2
- package/dist/types/inline-message/inline-message.types.d.ts +1 -1
- package/dist/types/inline-message/inline-message.types.d.ts.map +1 -1
- package/dist/types/kbd/kbd.types.d.ts +1 -1
- package/dist/types/list/list.types.d.ts +1 -1
- package/dist/types/listbox/listbox-defaults.d.ts +1 -1
- package/dist/types/listbox/listbox-parts.d.ts +2 -2
- package/dist/types/menu/menu-defaults.d.ts +1 -1
- package/dist/types/menu/menu-parts.d.ts +1 -1
- package/dist/types/message/message-demo.d.ts +2 -2
- package/dist/types/message/message-demo.d.ts.map +1 -1
- package/dist/types/message-scroller/message-scroller.d.ts +1 -1
- package/dist/types/notification-center/notification-center-defaults.d.ts +2 -2
- package/dist/types/notification-center/notification-center-demo.d.ts +1 -1
- package/dist/types/notification-center/notification-center-demo.d.ts.map +1 -1
- package/dist/types/notification-center/notification-center.types.d.ts +2 -2
- package/dist/types/otp-input/otp-input.d.ts +1 -1
- package/dist/types/page/page-demo.d.ts +2 -2
- package/dist/types/page/page-demo.d.ts.map +1 -1
- package/dist/types/progress-indicator/loader.d.ts +1 -1
- package/dist/types/progress-indicator/progress-circle.d.ts +1 -1
- package/dist/types/progress-indicator/progress-indicator.types.d.ts +1 -1
- package/dist/types/rating/rating-summary.d.ts +1 -1
- package/dist/types/rating/rating.types.d.ts +1 -1
- package/dist/types/result-state/result-state-demo.d.ts +1 -1
- package/dist/types/result-state/result-state.types.d.ts +1 -1
- package/dist/types/segmented-control/segmented-control.types.d.ts +1 -1
- package/dist/types/select/select.types.d.ts +1 -1
- package/dist/types/side-navigation/side-navigation.d.ts +1 -1
- package/dist/types/stat-card/stat-card.d.ts +1 -1
- package/dist/types/status-indicator/status-indicator.types.d.ts +3 -3
- package/dist/types/status-indicator/status-indicator.types.d.ts.map +1 -1
- package/dist/types/switch/switch.types.d.ts +1 -1
- package/dist/types/table/table-parts.d.ts +1 -1
- package/dist/types/table/table.types.d.ts +1 -1
- package/dist/types/table-of-contents/table-of-contents-demo.d.ts.map +1 -1
- package/dist/types/tabs/tabs.types.d.ts +2 -2
- package/dist/types/tag/tag.types.d.ts +3 -3
- package/dist/types/tag/tag.types.d.ts.map +1 -1
- package/dist/types/tags-input/tags-input.d.ts +1 -1
- package/dist/types/theme/theme-scope.d.ts +2 -2
- package/dist/types/theme/theme-scope.d.ts.map +1 -1
- package/dist/types/toast/toast-defaults.d.ts +1 -1
- package/dist/types/toast/toast.types.d.ts +2 -2
- package/dist/types/toast/toast.types.d.ts.map +1 -1
- package/dist/types/toggle/toggle.types.d.ts +1 -1
- package/dist/types/toggle-group/toggle-group.types.d.ts +1 -1
- package/dist/types/tooltip/tooltip-defaults.d.ts +1 -1
- package/dist/types/tour/tour.types.d.ts +2 -2
- package/dist/types/typography/text.d.ts +1 -1
- package/dist/types/typography/typography.attributes.d.ts +1 -1
- package/dist/types/typography/typography.types.d.ts +1 -1
- package/dist/types/typography/typography.types.d.ts.map +1 -1
- package/dist/{wizard-CpYwQGQ-.js → wizard-CmEJK55_.js} +2 -2
- package/dist/wizard.js +1 -1
- package/package.json +18 -6
package/dist/docs/avatar.md
CHANGED
|
@@ -15,15 +15,15 @@ Excerpt — not a complete module
|
|
|
15
15
|
|
|
16
16
|
| Name | Type | Default | Applies to | Description |
|
|
17
17
|
| --- | --- | --- | --- | --- |
|
|
18
|
-
| `name` | `string` | — | Avatar | The person or entity. It is the accessible name in every status, the source of the initials, and the seed of the
|
|
18
|
+
| `name` | `string` | — | Avatar | The person or entity. It is the accessible name in every status, the source of the initials, and the seed of the color |
|
|
19
19
|
| `src` | `string` | — | Avatar | The picture. Absent, the avatar is its fallback and nothing is requested |
|
|
20
20
|
| `initials` | `string` | — | Avatar | The letters to draw, in place of the ones derived from the name |
|
|
21
|
-
| `tone` | `'auto' \| 'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | auto | Avatar | Which of the five semantic
|
|
22
|
-
| `idFor` | `string` | — | Avatar | A stable identifier to derive the
|
|
23
|
-
| `variant` | `'soft' \| 'solid'` | soft | Avatar | How that
|
|
21
|
+
| `tone` | `'auto' \| 'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | auto | Avatar | Which of the five semantic colors the fallback is painted in. auto derives it from the name |
|
|
22
|
+
| `idFor` | `string` | — | Avatar | A stable identifier to derive the color from, when the name is not stable or two people share one |
|
|
23
|
+
| `variant` | `'soft' \| 'solid'` | soft | Avatar | How that color is painted: tinted, or filled |
|
|
24
24
|
| `surface` | `'tone' \| 'none' \| 'plate'` | tone | Avatar | The ground behind the avatar: the tone behind the fallback and nothing behind a loaded picture; nothing at all; or a light plate in every scheme, for a logo made for a white ground (--slotted-avatar-plate-surface) |
|
|
25
25
|
| `size` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | md | Avatar | Five steps, each of which answers density. --slotted-avatar-size states a size no step holds |
|
|
26
|
-
| `shape` | `'circle' \| 'square'` | circle | Avatar | A circle is a person; a square is a team, an
|
|
26
|
+
| `shape` | `'circle' \| 'square'` | circle | Avatar | A circle is a person; a square is a team, an organization or a bot |
|
|
27
27
|
| `status` | `'idle' \| 'loading' \| 'loaded' \| 'error'` | — | Avatar | Where the picture is. Supplied, it wins over what the family derives from the element |
|
|
28
28
|
| `onStatusChange` | `(status) => void` | — | Avatar | Reports the derived status. Never called for a status passed in |
|
|
29
29
|
| `disabled` | `boolean` | false | Avatar | A deactivated account, or an avatar inside a control the page has turned off |
|
|
@@ -51,12 +51,12 @@ Excerpt — not a complete module
|
|
|
51
51
|
- There is no avatar pattern in the WAI-ARIA Authoring Practices — the pattern index carries no entry, and the string does not occur on the page. The applicable guidance is the platform’s own: the img element and the img role in WAI-ARIA 1.2, the W3C WAI alt decision tree, and WCAG 2.2 1.1.1 Non-text Content, 1.4.11 Non-text Contrast and 2.5.8 Target Size (Minimum).
|
|
52
52
|
- The name is on the root, as aria-label with role="img", and the picture takes an empty alt. The avatar therefore announces the same thing in all four statuses: every surveyed implementation names the image instead, which makes the same avatar “Ada Lovelace” once the photograph loads and “AL” before it.
|
|
53
53
|
- An avatar with no name is aria-hidden, which is the rule Icon already takes: a name present decides role="img", an absent one decides that there is nothing to announce.
|
|
54
|
-
- decorative is the third case — a name that is written beside the avatar, where announcing it would read the person twice. The name still drives the initials and the
|
|
55
|
-
- The
|
|
54
|
+
- decorative is the third case — a name that is written beside the avatar, where announcing it would read the person twice. The name still drives the initials and the color.
|
|
55
|
+
- The color derived from a name is an aid to scanning a list, never the identifier: five tones mean collisions are certain, and color alone is not a signal. The name is what identifies the person, and it is present in every state.
|
|
56
56
|
- An avatar is not focusable and not a command. render can make the root an anchor or a button, and the family paints the focus ring and the hover edge for exactly that case — and holds both back when the avatar is disabled.
|
|
57
|
-
- An interactive avatar smaller than 24 by 24 CSS pixels grows a
|
|
57
|
+
- An interactive avatar smaller than 24 by 24 CSS pixels grows a centerd overlay to --slotted-target-min, so WCAG 2.2 2.5.8 is met at the two tighter densities without changing any layout. Inside a stack the overlay can reach under a neighbour; the raised member wins the pointer.
|
|
58
58
|
- The fallback glyph is the person Glyph in an aria-hidden Icon, not a character: no font can be relied on to carry a silhouette, and a character would be read out.
|
|
59
|
-
- Under forced
|
|
59
|
+
- Under forced colors the family draws its edge in currentColor, because the theme maps every tone ground to one system color. The photograph is left alone: a portrait reduced to two system colors is not a portrait.
|
|
60
60
|
- The picture crosses over the initials on --slotted-duration-short, which prefers-reduced-motion collapses to 1ms in the theme. Nothing here loops.
|
|
61
61
|
|
|
62
62
|
## Tokens
|
package/dist/docs/badge.json
CHANGED
|
@@ -92,14 +92,14 @@
|
|
|
92
92
|
"type": "'accent' | 'secondary' | 'info' | 'success' | 'warning' | 'danger'",
|
|
93
93
|
"defaultValue": "secondary",
|
|
94
94
|
"appliesTo": "Badge",
|
|
95
|
-
"description": "Which of the five semantic
|
|
95
|
+
"description": "Which of the five semantic colors the badge speaks in"
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"name": "variant",
|
|
99
99
|
"type": "'solid' | 'soft' | 'outline'",
|
|
100
100
|
"defaultValue": "soft",
|
|
101
101
|
"appliesTo": "Badge",
|
|
102
|
-
"description": "How that
|
|
102
|
+
"description": "How that color is painted: filled, tinted, or an edge alone. All three draw the same tone edge"
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"name": "size",
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"type": "ReactNode",
|
|
149
149
|
"defaultValue": "—",
|
|
150
150
|
"appliesTo": "Badge",
|
|
151
|
-
"description": "A glyph before the words, wrapped in the start part, which sizes and
|
|
151
|
+
"description": "A glyph before the words, wrapped in the start part, which sizes and centers it"
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
154
|
"name": "end",
|
|
@@ -213,11 +213,11 @@
|
|
|
213
213
|
"There is no badge pattern in the WAI-ARIA Authoring Practices — the pattern index carries no entry — and there is no badge role. The applicable guidance is the status role in WAI-ARIA 1.2, and WCAG 2.2 1.4.1 Use of Color, 1.4.11 Non-text Contrast and 4.1.3 Status Messages.",
|
|
214
214
|
"The root is a span with no role. What a badge means comes from where it sits, and a role invented here would be wrong more often than right.",
|
|
215
215
|
"live is the announcement policy for a badge whose value changes: polite writes role=\"status\", whose implicit aria-live and aria-atomic are what a changing count needs; assertive writes role=\"alert\". It is off by default, because a page of twenty badges that all announce is a page no screen reader user can read.",
|
|
216
|
-
"A dot says nothing a screen reader can read. Put the words beside it — a VisuallyHidden inside the badge — because
|
|
216
|
+
"A dot says nothing a screen reader can read. Put the words beside it — a VisuallyHidden inside the badge — because color alone is not a signal. Inside a badge that element is out of flow, so it costs no space and the gap reserves nothing for it.",
|
|
217
217
|
"The dot is the only badge whose whole meaning is a graphic, so its rim is --slotted-border-strong: the one border token the theme holds to 3:1 against the surface. A pill or a square carries text, so its edge is decoration.",
|
|
218
218
|
"BadgeAnchor wraps its host rather than rewriting it. The badge is read after the host in document order. When the host is interactive and its name must carry the count, either wire aria-describedby from the host to the badge’s own id, or name the count in the host’s aria-label — “Inbox, 4 unread messages”.",
|
|
219
219
|
"A badge is not focusable and is never a command: it answers no hover and gives no press feedback. render can make the root an anchor, and the family paints the focus ring for exactly that case.",
|
|
220
|
-
"Under forced
|
|
220
|
+
"Under forced colors every tone ground becomes one system color, so the family draws its edge in currentColor there. It is the only rule the family writes for that mode.",
|
|
221
221
|
"A count of nought removes the badge from the page entirely rather than leaving an empty circle, so nothing announces a value that is no longer there.",
|
|
222
222
|
"A badge is one line. A string too long for its container is clipped with an ellipsis rather than reflowed, and the clipping is visual only: text-overflow shortens nothing, so the whole value stays in the DOM, stays in the accessibility tree, and a page search still finds it. A value that routinely needs more room is a Tag, not a Badge.",
|
|
223
223
|
"The count is formatted with Intl.NumberFormat, so a total reads 1.234 in de-DE and ١٬٢٣٤ in ar-EG. Set locale on the provider when the application server-renders counts above its grouping threshold."
|
package/dist/docs/badge.md
CHANGED
|
@@ -17,15 +17,15 @@ Excerpt — not a complete module
|
|
|
17
17
|
|
|
18
18
|
| Name | Type | Default | Applies to | Description |
|
|
19
19
|
| --- | --- | --- | --- | --- |
|
|
20
|
-
| `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | Badge | Which of the five semantic
|
|
21
|
-
| `variant` | `'solid' \| 'soft' \| 'outline'` | soft | Badge | How that
|
|
20
|
+
| `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | Badge | Which of the five semantic colors the badge speaks in |
|
|
21
|
+
| `variant` | `'solid' \| 'soft' \| 'outline'` | soft | Badge | How that color is painted: filled, tinted, or an edge alone. All three draw the same tone edge |
|
|
22
22
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | Badge | Type and glyph come from the control scale, so a badge shrinks with density beside the controls it sits with |
|
|
23
23
|
| `shape` | `'pill' \| 'square' \| 'dot'` | pill | Badge | A dot is the same badge, tone and hidden text, drawn without a value |
|
|
24
24
|
| `count` | `number` | — | Badge | The number the badge shows, written before any children and formatted for the locale |
|
|
25
25
|
| `max` | `number \| false` | 99 | Badge | The largest count written in full; above it the badge shows the ceiling and a plus. false removes the ceiling |
|
|
26
26
|
| `showZero` | `boolean` | false | Badge | Whether a count of nought is a value worth showing or an absence that removes the badge |
|
|
27
27
|
| `locale` | `string` | — | Badge | BCP 47, for the digits of count. Falls back to the provider, then to the runtime |
|
|
28
|
-
| `start` | `ReactNode` | — | Badge | A glyph before the words, wrapped in the start part, which sizes and
|
|
28
|
+
| `start` | `ReactNode` | — | Badge | A glyph before the words, wrapped in the start part, which sizes and centers it |
|
|
29
29
|
| `end` | `ReactNode` | — | Badge | A glyph after the words, wrapped in the end part |
|
|
30
30
|
| `live` | `'off' \| 'polite' \| 'assertive'` | off | Badge | Whether a change to this badge is announced, and how urgently |
|
|
31
31
|
| `placement` | `'top-end' \| 'top-start' \| 'bottom-end' \| 'bottom-start'` | top-end | BadgeAnchor | Which corner of the host the badge sits on. Mirrors in a right-to-left document |
|
|
@@ -52,11 +52,11 @@ Excerpt — not a complete module
|
|
|
52
52
|
- There is no badge pattern in the WAI-ARIA Authoring Practices — the pattern index carries no entry — and there is no badge role. The applicable guidance is the status role in WAI-ARIA 1.2, and WCAG 2.2 1.4.1 Use of Color, 1.4.11 Non-text Contrast and 4.1.3 Status Messages.
|
|
53
53
|
- The root is a span with no role. What a badge means comes from where it sits, and a role invented here would be wrong more often than right.
|
|
54
54
|
- live is the announcement policy for a badge whose value changes: polite writes role="status", whose implicit aria-live and aria-atomic are what a changing count needs; assertive writes role="alert". It is off by default, because a page of twenty badges that all announce is a page no screen reader user can read.
|
|
55
|
-
- A dot says nothing a screen reader can read. Put the words beside it — a VisuallyHidden inside the badge — because
|
|
55
|
+
- A dot says nothing a screen reader can read. Put the words beside it — a VisuallyHidden inside the badge — because color alone is not a signal. Inside a badge that element is out of flow, so it costs no space and the gap reserves nothing for it.
|
|
56
56
|
- The dot is the only badge whose whole meaning is a graphic, so its rim is --slotted-border-strong: the one border token the theme holds to 3:1 against the surface. A pill or a square carries text, so its edge is decoration.
|
|
57
57
|
- BadgeAnchor wraps its host rather than rewriting it. The badge is read after the host in document order. When the host is interactive and its name must carry the count, either wire aria-describedby from the host to the badge’s own id, or name the count in the host’s aria-label — “Inbox, 4 unread messages”.
|
|
58
58
|
- A badge is not focusable and is never a command: it answers no hover and gives no press feedback. render can make the root an anchor, and the family paints the focus ring for exactly that case.
|
|
59
|
-
- Under forced
|
|
59
|
+
- Under forced colors every tone ground becomes one system color, so the family draws its edge in currentColor there. It is the only rule the family writes for that mode.
|
|
60
60
|
- A count of nought removes the badge from the page entirely rather than leaving an empty circle, so nothing announces a value that is no longer there.
|
|
61
61
|
- A badge is one line. A string too long for its container is clipped with an ellipsis rather than reflowed, and the clipping is visual only: text-overflow shortens nothing, so the whole value stays in the DOM, stays in the accessibility tree, and a page search still finds it. A value that routinely needs more room is a Tag, not a Badge.
|
|
62
62
|
- The count is formatted with Intl.NumberFormat, so a total reads 1.234 in de-DE and ١٬٢٣٤ in ar-EG. Set locale on the provider when the application server-renders counts above its grouping threshold.
|
|
@@ -301,7 +301,7 @@
|
|
|
301
301
|
{
|
|
302
302
|
"id": "current",
|
|
303
303
|
"title": "The page you are on",
|
|
304
|
-
"note": "The last crumb is a span carrying aria-current=\"page\", which is the value the ARIA specification names for a link inside a set of pages. It gains weight rather than
|
|
304
|
+
"note": "The last crumb is a span carrying aria-current=\"page\", which is the value the ARIA specification names for a link inside a set of pages. It gains weight rather than color alone.",
|
|
305
305
|
"language": "tsx",
|
|
306
306
|
"source": "<BreadcrumbItem>\n <BreadcrumbPage>INV-2026-08-0041</BreadcrumbPage>\n</BreadcrumbItem>;\n",
|
|
307
307
|
"verdict": "excerpt"
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
{
|
|
334
334
|
"id": "switcher",
|
|
335
335
|
"title": "Crumbs that switch between siblings",
|
|
336
|
-
"note": "
|
|
336
|
+
"note": "Organization, project and environment each open a menu of their siblings. The open one keeps its underline and turns its chevron, and the environment the reader is on still says it is this page.",
|
|
337
337
|
"language": "tsx",
|
|
338
338
|
"source": "<BreadcrumbItem>\n <Menu>\n <MenuTrigger\n render={(props) => (\n <BreadcrumbTrigger {...props} current>\n Production\n </BreadcrumbTrigger>\n )}\n />\n <MenuContent>\n <MenuItem>Preview</MenuItem>\n <MenuItem>Development</MenuItem>\n </MenuContent>\n </Menu>\n</BreadcrumbItem>;\n",
|
|
339
339
|
"verdict": "excerpt"
|
package/dist/docs/breadcrumb.md
CHANGED
|
@@ -126,7 +126,7 @@ Excerpt — not a complete module
|
|
|
126
126
|
|
|
127
127
|
### The page you are on
|
|
128
128
|
|
|
129
|
-
The last crumb is a span carrying aria-current="page", which is the value the ARIA specification names for a link inside a set of pages. It gains weight rather than
|
|
129
|
+
The last crumb is a span carrying aria-current="page", which is the value the ARIA specification names for a link inside a set of pages. It gains weight rather than color alone.
|
|
130
130
|
|
|
131
131
|
Excerpt — not a complete module
|
|
132
132
|
|
|
@@ -179,7 +179,7 @@ Excerpt — not a complete module
|
|
|
179
179
|
|
|
180
180
|
### Crumbs that switch between siblings
|
|
181
181
|
|
|
182
|
-
|
|
182
|
+
Organization, project and environment each open a menu of their siblings. The open one keeps its underline and turns its chevron, and the environment the reader is on still says it is this page.
|
|
183
183
|
|
|
184
184
|
Excerpt — not a complete module
|
|
185
185
|
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"A boundary that carries meaning is better said by a nested group with a name of its own than by a rule: an announced separator says a boundary exists, while a named group says what is on either side of it.",
|
|
129
129
|
"The separator takes its axis from the group, mirrored: a rule across a row is vertical.",
|
|
130
130
|
"Nothing here depends on hover, and nothing is decided by script. The buttons are joined by the stylesheet alone, so the bar is the same shape before hydration and with JavaScript disabled.",
|
|
131
|
-
"The buttons keep the accessible names, disabled
|
|
131
|
+
"The buttons keep the accessible names, disabled behavior and loading announcements the button family gives them. The group adds nothing to them and removes nothing from them.",
|
|
132
132
|
"A toggle button belongs in a bar of actions, and the group keeps its frame whole around one — but an exclusive set of them is toggle-group, not this family. Built here by hand the set has no exclusivity, no shared keyboard and one tab stop per control where the pattern gives one for the set; toggle-group owns the value, the roving focus and the group semantics over it."
|
|
133
133
|
]
|
|
134
134
|
}
|
|
@@ -46,7 +46,7 @@ Excerpt — not a complete module
|
|
|
46
46
|
- A boundary that carries meaning is better said by a nested group with a name of its own than by a rule: an announced separator says a boundary exists, while a named group says what is on either side of it.
|
|
47
47
|
- The separator takes its axis from the group, mirrored: a rule across a row is vertical.
|
|
48
48
|
- Nothing here depends on hover, and nothing is decided by script. The buttons are joined by the stylesheet alone, so the bar is the same shape before hydration and with JavaScript disabled.
|
|
49
|
-
- The buttons keep the accessible names, disabled
|
|
49
|
+
- The buttons keep the accessible names, disabled behavior and loading announcements the button family gives them. The group adds nothing to them and removes nothing from them.
|
|
50
50
|
- A toggle button belongs in a bar of actions, and the group keeps its frame whole around one — but an exclusive set of them is toggle-group, not this family. Built here by hand the set has no exclusivity, no shared keyboard and one tab stop per control where the pattern gives one for the set; toggle-group owns the value, the roving focus and the group semantics over it.
|
|
51
51
|
|
|
52
52
|
## Tokens
|
package/dist/docs/button.json
CHANGED
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
"part": "label",
|
|
228
228
|
"element": "span",
|
|
229
229
|
"required": true,
|
|
230
|
-
"purpose": "Wraps the children. Always rendered, because the accessible name is computed from it. With reduced motion or forced
|
|
230
|
+
"purpose": "Wraps the children. Always rendered, because the accessible name is computed from it. With reduced motion or forced colors, a loading button with no icon fades it in place, and it keeps its size."
|
|
231
231
|
},
|
|
232
232
|
{
|
|
233
233
|
"part": "end",
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
"part": "indicator",
|
|
240
240
|
"element": "span with role=\"progressbar\"",
|
|
241
241
|
"required": false,
|
|
242
|
-
"purpose": "The loading indicator. Carries data-ui=\"spinner\", is named by messages.loading, and has no value, so it reads as indeterminate. Rendered in the start box, else in the end box, else
|
|
242
|
+
"purpose": "The loading indicator. Carries data-ui=\"spinner\", is named by messages.loading, and has no value, so it reads as indeterminate. Rendered in the start box, else in the end box, else centerd over the label, once loadingDelay has passed."
|
|
243
243
|
}
|
|
244
244
|
],
|
|
245
245
|
"api": [
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
"type": "accent | secondary | neutral | info | success | warning | danger",
|
|
249
249
|
"defaultValue": "accent",
|
|
250
250
|
"appliesTo": "Button",
|
|
251
|
-
"description": "The semantic
|
|
251
|
+
"description": "The semantic color: accent for the primary action, secondary for a neutral one, neutral for a primary action drawn in ink where the accent is kept for data, and success, warning or danger for what the action does."
|
|
252
252
|
},
|
|
253
253
|
{
|
|
254
254
|
"name": "variant",
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
"accessibility": [
|
|
356
356
|
"Button renders a native button element, so Space, Enter, focus and the disabled state come from the platform. The visible label supplies the accessible name.",
|
|
357
357
|
"While loading, the indicator is a progress bar named by messages.loading, and the button announces aria-disabled while it keeps focus. React Aria’s pending button and Primer’s loading button use the same pattern. aria-busy is not set: screen readers do not announce it reliably on a button, and one mechanism already carries the state.",
|
|
358
|
-
"Where motion is allowed, the indicator is not drawn: once loadingDelay has passed, a band in the button’s own ink sweeps behind the label and the icon, which stay visible. With reduced motion or forced
|
|
358
|
+
"Where motion is allowed, the indicator is not drawn: once loadingDelay has passed, a band in the button’s own ink sweeps behind the label and the icon, which stay visible. With reduced motion or forced colors, the indicator is a ring drawn in the start or end icon’s box; a button with neither draws it over the label, which drops to zero opacity but stays in the accessibility tree and in the layout, so the accessible name survives the wait and the button keeps its size.",
|
|
359
359
|
"loading refuses activation in the capture phase, before any click handler you attach, so a submit button cannot submit its form twice.",
|
|
360
360
|
"focusableWhenDisabled keeps a disabled button reachable. Use it when the button has a tooltip or an explanation a keyboard user needs, such as inside a toolbar. A reachable disabled button uses muted text on the subtle neutral background, at a contrast of 4.5:1 or more; a natively disabled button keeps the disabled grey.",
|
|
361
361
|
"An icon in start or end repeats the label, so mark it aria-hidden. Glyph sets aria-hidden itself.",
|
|
@@ -412,7 +412,7 @@
|
|
|
412
412
|
"type": "accent | secondary | neutral | info | success | warning | danger",
|
|
413
413
|
"defaultValue": "accent",
|
|
414
414
|
"appliesTo": "ButtonLink",
|
|
415
|
-
"description": "The semantic
|
|
415
|
+
"description": "The semantic color: accent for the primary action, secondary for a neutral one, neutral for a primary action drawn in ink where the accent is kept for data, and success, warning or danger for what the action does."
|
|
416
416
|
},
|
|
417
417
|
{
|
|
418
418
|
"name": "variant",
|
|
@@ -511,7 +511,7 @@
|
|
|
511
511
|
"type": "accent | secondary | neutral | info | success | warning | danger",
|
|
512
512
|
"defaultValue": "secondary",
|
|
513
513
|
"appliesTo": "IconButton",
|
|
514
|
-
"description": "The semantic
|
|
514
|
+
"description": "The semantic color: accent for the primary action, secondary for a neutral one, neutral for a primary action drawn in ink where the accent is kept for data, and success, warning or danger for what the action does."
|
|
515
515
|
},
|
|
516
516
|
{
|
|
517
517
|
"name": "variant",
|
|
@@ -611,7 +611,7 @@
|
|
|
611
611
|
"The type requires an accessible name: pass aria-label or aria-labelledby. An icon supplies no text the name could be computed from.",
|
|
612
612
|
"aria-pressed is rendered only when pressed or defaultPressed is passed, so a plain icon button does not announce a toggle state it does not have.",
|
|
613
613
|
"Keep the name the same in both pressed states. The APG toggle button pattern announces the state beside an unchanging label.",
|
|
614
|
-
"A pressed icon button uses the selected
|
|
614
|
+
"A pressed icon button uses the selected colors of the theme — accent text on the accent selection background, inside the accent edge — whatever its tone and variant. On hover it uses the hover step of that background, not the neutral hover of an unpressed button.",
|
|
615
615
|
"The control is as wide as it is tall, at the control height, and never smaller than the WCAG 2.2 minimum target of 24 by 24 CSS pixels at any density.",
|
|
616
616
|
"Add a tooltip when the icon alone does not say what the action does. The accessible name does not replace a visible label."
|
|
617
617
|
]
|
|
@@ -661,7 +661,7 @@
|
|
|
661
661
|
"type": "accent | secondary | neutral | info | success | warning | danger",
|
|
662
662
|
"defaultValue": "secondary",
|
|
663
663
|
"appliesTo": "IconButtonLink",
|
|
664
|
-
"description": "The semantic
|
|
664
|
+
"description": "The semantic color: accent for the primary action, secondary for a neutral one, neutral for a primary action drawn in ink where the accent is kept for data, and success, warning or danger for what the action does."
|
|
665
665
|
},
|
|
666
666
|
{
|
|
667
667
|
"name": "variant",
|
|
@@ -722,7 +722,7 @@
|
|
|
722
722
|
"part": "label",
|
|
723
723
|
"element": "span",
|
|
724
724
|
"required": true,
|
|
725
|
-
"purpose": "Wraps the children. Always rendered, because the accessible name is computed from it. With reduced motion or forced
|
|
725
|
+
"purpose": "Wraps the children. Always rendered, because the accessible name is computed from it. With reduced motion or forced colors, a loading button with no icon fades it in place, and it keeps its size."
|
|
726
726
|
},
|
|
727
727
|
{
|
|
728
728
|
"part": "end",
|
|
@@ -734,7 +734,7 @@
|
|
|
734
734
|
"part": "indicator",
|
|
735
735
|
"element": "span with role=\"progressbar\"",
|
|
736
736
|
"required": false,
|
|
737
|
-
"purpose": "The loading indicator. Carries data-ui=\"spinner\", is named by messages.loading, and has no value, so it reads as indeterminate. Rendered in the start box, else in the end box, else
|
|
737
|
+
"purpose": "The loading indicator. Carries data-ui=\"spinner\", is named by messages.loading, and has no value, so it reads as indeterminate. Rendered in the start box, else in the end box, else centerd over the label, once loadingDelay has passed."
|
|
738
738
|
}
|
|
739
739
|
],
|
|
740
740
|
"api": [
|
|
@@ -743,7 +743,7 @@
|
|
|
743
743
|
"type": "accent | secondary | neutral | info | success | warning | danger",
|
|
744
744
|
"defaultValue": "secondary",
|
|
745
745
|
"appliesTo": "ToggleButton",
|
|
746
|
-
"description": "The semantic
|
|
746
|
+
"description": "The semantic color: accent for the primary action, secondary for a neutral one, neutral for a primary action drawn in ink where the accent is kept for data, and success, warning or danger for what the action does."
|
|
747
747
|
},
|
|
748
748
|
{
|
|
749
749
|
"name": "variant",
|
package/dist/docs/button.md
CHANGED
|
@@ -79,7 +79,7 @@ export default function ButtonBasic() {
|
|
|
79
79
|
|
|
80
80
|
| Name | Type | Default | Applies to | Description |
|
|
81
81
|
| --- | --- | --- | --- | --- |
|
|
82
|
-
| `tone` | `accent \| secondary \| neutral \| info \| success \| warning \| danger` | accent | Button | The semantic
|
|
82
|
+
| `tone` | `accent \| secondary \| neutral \| info \| success \| warning \| danger` | accent | Button | The semantic color: accent for the primary action, secondary for a neutral one, neutral for a primary action drawn in ink where the accent is kept for data, and success, warning or danger for what the action does. |
|
|
83
83
|
| `variant` | `solid \| outline \| ghost` | solid | Button | How the tone is painted: solid, outline or ghost. |
|
|
84
84
|
| `size` | `sm \| md \| lg` | md | Button | The step of the control scale. Each step reads the --slotted-control-* tokens, so the density of the theme sets the height. |
|
|
85
85
|
| `start` | `ReactNode` | — | Button | Content before the label, such as an icon. It mirrors in a right-to-left document. |
|
|
@@ -101,7 +101,7 @@ export default function ButtonBasic() {
|
|
|
101
101
|
| --- | --- | --- | --- | --- |
|
|
102
102
|
| `href` | `string` | required without render | ButtonLink | The destination. A disabled ButtonLink does not render it. |
|
|
103
103
|
| `render` | `(rootProps) => ReactElement` | — | ButtonLink | Renders the root through a router’s link component. The function receives every root prop and must pass all of them on. |
|
|
104
|
-
| `tone` | `accent \| secondary \| neutral \| info \| success \| warning \| danger` | accent | ButtonLink | The semantic
|
|
104
|
+
| `tone` | `accent \| secondary \| neutral \| info \| success \| warning \| danger` | accent | ButtonLink | The semantic color: accent for the primary action, secondary for a neutral one, neutral for a primary action drawn in ink where the accent is kept for data, and success, warning or danger for what the action does. |
|
|
105
105
|
| `variant` | `solid \| outline \| ghost` | solid | ButtonLink | How the tone is painted: solid, outline or ghost. |
|
|
106
106
|
| `size` | `sm \| md \| lg` | md | ButtonLink | The step of the control scale. Each step reads the --slotted-control-* tokens, so the density of the theme sets the height. |
|
|
107
107
|
| `start` | `ReactNode` | — | ButtonLink | Content before the label, such as an icon. It mirrors in a right-to-left document. |
|
|
@@ -115,7 +115,7 @@ export default function ButtonBasic() {
|
|
|
115
115
|
| Name | Type | Default | Applies to | Description |
|
|
116
116
|
| --- | --- | --- | --- | --- |
|
|
117
117
|
| `aria-label \| aria-labelledby` | `string` | required | IconButton | The accessible name. Required, because an icon supplies no text. When both are present, aria-labelledby names the button. |
|
|
118
|
-
| `tone` | `accent \| secondary \| neutral \| info \| success \| warning \| danger` | secondary | IconButton | The semantic
|
|
118
|
+
| `tone` | `accent \| secondary \| neutral \| info \| success \| warning \| danger` | secondary | IconButton | The semantic color: accent for the primary action, secondary for a neutral one, neutral for a primary action drawn in ink where the accent is kept for data, and success, warning or danger for what the action does. |
|
|
119
119
|
| `variant` | `solid \| outline \| ghost` | ghost | IconButton | How the tone is painted: solid, outline or ghost. |
|
|
120
120
|
| `size` | `sm \| md \| lg` | md | IconButton | The step of the control scale. Each step reads the --slotted-control-* tokens, so the density of the theme sets the height. |
|
|
121
121
|
| `shape` | `square \| circle` | square | IconButton | The corners of the control: square keeps the radius of the control scale, circle rounds it fully. Both are as wide as they are tall. |
|
|
@@ -137,7 +137,7 @@ export default function ButtonBasic() {
|
|
|
137
137
|
| `aria-label \| aria-labelledby` | `string` | required | IconButtonLink | The accessible name. Required, because an icon supplies no text. When both are present, aria-labelledby names the link. |
|
|
138
138
|
| `href` | `string` | required without render | IconButtonLink | The destination. A disabled IconButtonLink does not render it. |
|
|
139
139
|
| `render` | `(rootProps) => ReactElement` | — | IconButtonLink | Renders the root through a router’s link component. The function receives anchor props — every root prop — and must pass all of them on. |
|
|
140
|
-
| `tone` | `accent \| secondary \| neutral \| info \| success \| warning \| danger` | secondary | IconButtonLink | The semantic
|
|
140
|
+
| `tone` | `accent \| secondary \| neutral \| info \| success \| warning \| danger` | secondary | IconButtonLink | The semantic color: accent for the primary action, secondary for a neutral one, neutral for a primary action drawn in ink where the accent is kept for data, and success, warning or danger for what the action does. |
|
|
141
141
|
| `variant` | `solid \| outline \| ghost` | ghost | IconButtonLink | How the tone is painted: solid, outline or ghost. |
|
|
142
142
|
| `size` | `sm \| md \| lg` | md | IconButtonLink | The step of the control scale. Each step reads the --slotted-control-* tokens, so the density of the theme sets the height. |
|
|
143
143
|
| `shape` | `square \| circle` | square | IconButtonLink | The corners of the control: square keeps the radius of the control scale, circle rounds it fully. Both are as wide as they are tall. |
|
|
@@ -147,7 +147,7 @@ export default function ButtonBasic() {
|
|
|
147
147
|
|
|
148
148
|
| Name | Type | Default | Applies to | Description |
|
|
149
149
|
| --- | --- | --- | --- | --- |
|
|
150
|
-
| `tone` | `accent \| secondary \| neutral \| info \| success \| warning \| danger` | secondary | ToggleButton | The semantic
|
|
150
|
+
| `tone` | `accent \| secondary \| neutral \| info \| success \| warning \| danger` | secondary | ToggleButton | The semantic color: accent for the primary action, secondary for a neutral one, neutral for a primary action drawn in ink where the accent is kept for data, and success, warning or danger for what the action does. |
|
|
151
151
|
| `variant` | `solid \| outline \| ghost` | outline | ToggleButton | How the tone is painted: solid, outline or ghost. |
|
|
152
152
|
| `size` | `sm \| md \| lg` | md | ToggleButton | The step of the control scale. Each step reads the --slotted-control-* tokens, so the density of the theme sets the height. |
|
|
153
153
|
| `start` | `ReactNode` | — | ToggleButton | Content before the label, such as an icon. It mirrors in a right-to-left document. |
|
|
@@ -179,7 +179,7 @@ export default function ButtonBasic() {
|
|
|
179
179
|
|
|
180
180
|
- Button renders a native button element, so Space, Enter, focus and the disabled state come from the platform. The visible label supplies the accessible name.
|
|
181
181
|
- While loading, the indicator is a progress bar named by messages.loading, and the button announces aria-disabled while it keeps focus. React Aria’s pending button and Primer’s loading button use the same pattern. aria-busy is not set: screen readers do not announce it reliably on a button, and one mechanism already carries the state.
|
|
182
|
-
- Where motion is allowed, the indicator is not drawn: once loadingDelay has passed, a band in the button’s own ink sweeps behind the label and the icon, which stay visible. With reduced motion or forced
|
|
182
|
+
- Where motion is allowed, the indicator is not drawn: once loadingDelay has passed, a band in the button’s own ink sweeps behind the label and the icon, which stay visible. With reduced motion or forced colors, the indicator is a ring drawn in the start or end icon’s box; a button with neither draws it over the label, which drops to zero opacity but stays in the accessibility tree and in the layout, so the accessible name survives the wait and the button keeps its size.
|
|
183
183
|
- loading refuses activation in the capture phase, before any click handler you attach, so a submit button cannot submit its form twice.
|
|
184
184
|
- focusableWhenDisabled keeps a disabled button reachable. Use it when the button has a tooltip or an explanation a keyboard user needs, such as inside a toolbar. A reachable disabled button uses muted text on the subtle neutral background, at a contrast of 4.5:1 or more; a natively disabled button keeps the disabled grey.
|
|
185
185
|
- An icon in start or end repeats the label, so mark it aria-hidden. Glyph sets aria-hidden itself.
|
|
@@ -192,7 +192,7 @@ export default function ButtonBasic() {
|
|
|
192
192
|
- The type requires an accessible name: pass aria-label or aria-labelledby. An icon supplies no text the name could be computed from.
|
|
193
193
|
- aria-pressed is rendered only when pressed or defaultPressed is passed, so a plain icon button does not announce a toggle state it does not have.
|
|
194
194
|
- Keep the name the same in both pressed states. The APG toggle button pattern announces the state beside an unchanging label.
|
|
195
|
-
- A pressed icon button uses the selected
|
|
195
|
+
- A pressed icon button uses the selected colors of the theme — accent text on the accent selection background, inside the accent edge — whatever its tone and variant. On hover it uses the hover step of that background, not the neutral hover of an unpressed button.
|
|
196
196
|
- The control is as wide as it is tall, at the control height, and never smaller than the WCAG 2.2 minimum target of 24 by 24 CSS pixels at any density.
|
|
197
197
|
- Add a tooltip when the icon alone does not say what the action does. The accessible name does not replace a visible label.
|
|
198
198
|
- IconButtonLink renders an anchor, so it is announced as a link and activates on Enter. Use it for an icon-only control that navigates, such as the previous and next record; an icon-only action is an IconButton.
|
package/dist/docs/calendar.json
CHANGED
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
"part": "years",
|
|
200
200
|
"element": "div",
|
|
201
201
|
"required": false,
|
|
202
|
-
"purpose": "The year view’s own grid, four across and twelve to a page. The page is anchored rather than
|
|
202
|
+
"purpose": "The year view’s own grid, four across and twelve to a page. The page is anchored rather than centerd, so the year the reader is on keeps its cell between presses."
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
205
|
"part": "period",
|
|
@@ -368,7 +368,7 @@
|
|
|
368
368
|
"type": "boolean",
|
|
369
369
|
"defaultValue": "—",
|
|
370
370
|
"appliesTo": "Calendar",
|
|
371
|
-
"description": "Retargets the focus ring to the danger
|
|
371
|
+
"description": "Retargets the focus ring to the danger color."
|
|
372
372
|
},
|
|
373
373
|
{
|
|
374
374
|
"name": "messages",
|
|
@@ -430,7 +430,7 @@
|
|
|
430
430
|
"Exactly one cell is in the tab sequence, and the arrows move it. Focus is only put back into the DOM after a key moved it, never on a render, so a calendar on a page does not steal the reader’s place.",
|
|
431
431
|
"The heading is a polite live region, because paging with a key changes nothing that focus lands on and nothing else would announce the new month.",
|
|
432
432
|
"A column header shows the locale’s narrow weekday and carries the full name in abbr, which is the difference between a screen reader saying \"Mo\" and saying \"Monday\".",
|
|
433
|
-
"A date the predicate refuses carries aria-disabled rather than being removed, so a reader can arrow onto it and be told why it is out; and it is struck through as well as dimmed, because
|
|
433
|
+
"A date the predicate refuses carries aria-disabled rather than being removed, so a reader can arrow onto it and be told why it is out; and it is struck through as well as dimmed, because color alone says nothing under forced colors.",
|
|
434
434
|
"Today is a dot under the number and focus is a ring around it. They were the same ring once, and a reader arrowing onto today saw one box and could not tell which of the two facts it was."
|
|
435
435
|
]
|
|
436
436
|
}
|
|
@@ -566,7 +566,7 @@
|
|
|
566
566
|
{
|
|
567
567
|
"id": "unavailable",
|
|
568
568
|
"title": "Days that are refused",
|
|
569
|
-
"note": "A refused date stays focusable — aria-disabled, never disabled — so a reader can arrow onto it, be told why it is out, and arrow past. Struck through rather than only faded, because
|
|
569
|
+
"note": "A refused date stays focusable — aria-disabled, never disabled — so a reader can arrow onto it, be told why it is out, and arrow past. Struck through rather than only faded, because color alone says nothing under forced colors.",
|
|
570
570
|
"language": "tsx",
|
|
571
571
|
"source": "<Calendar isDateUnavailable={(date) => isWeekend(date) || isHoliday(date)} />;\n",
|
|
572
572
|
"verdict": "excerpt"
|
package/dist/docs/calendar.md
CHANGED
|
@@ -66,7 +66,7 @@ Excerpt — not a complete module
|
|
|
66
66
|
| `calendar` | `'gregory'` | gregory | Calendar | The calendar system. One value today, and an axis rather than a silence. |
|
|
67
67
|
| `disabled` | `boolean` | — | Calendar | Answers no key and no press, and takes every cell out of the tab sequence. |
|
|
68
68
|
| `readOnly` | `boolean` | — | Calendar | Readable and not changeable, and never faded. |
|
|
69
|
-
| `invalid` | `boolean` | — | Calendar | Retargets the focus ring to the danger
|
|
69
|
+
| `invalid` | `boolean` | — | Calendar | Retargets the focus ring to the danger color. |
|
|
70
70
|
| `messages` | `Partial<CalendarMessages>` | — | Calendar | Words laid over the language in force, key by key: the back (previous) and forward (next) triggers’ accessible names. |
|
|
71
71
|
| `CalendarDefaultsProvider` | `component` | — | application | Sets timeZone, firstDayOfWeek, months, weekNumbers, fixedWeeks, outsideDays and calendar once for everything under it; a prop on the calendar still wins. |
|
|
72
72
|
| `render` | `(props: CalendarRootProps) => ReactNode` | — | Calendar | Substitutes the element the root renders. The props carry the ref, which the family reaches its own cells through. |
|
|
@@ -99,7 +99,7 @@ Excerpt — not a complete module
|
|
|
99
99
|
- Exactly one cell is in the tab sequence, and the arrows move it. Focus is only put back into the DOM after a key moved it, never on a render, so a calendar on a page does not steal the reader’s place.
|
|
100
100
|
- The heading is a polite live region, because paging with a key changes nothing that focus lands on and nothing else would announce the new month.
|
|
101
101
|
- A column header shows the locale’s narrow weekday and carries the full name in abbr, which is the difference between a screen reader saying "Mo" and saying "Monday".
|
|
102
|
-
- A date the predicate refuses carries aria-disabled rather than being removed, so a reader can arrow onto it and be told why it is out; and it is struck through as well as dimmed, because
|
|
102
|
+
- A date the predicate refuses carries aria-disabled rather than being removed, so a reader can arrow onto it and be told why it is out; and it is struck through as well as dimmed, because color alone says nothing under forced colors.
|
|
103
103
|
- Today is a dot under the number and focus is a ring around it. They were the same ring once, and a reader arrowing onto today saw one box and could not tell which of the two facts it was.
|
|
104
104
|
|
|
105
105
|
## Tokens
|
|
@@ -178,7 +178,7 @@ Excerpt — not a complete module
|
|
|
178
178
|
|
|
179
179
|
### Days that are refused
|
|
180
180
|
|
|
181
|
-
A refused date stays focusable — aria-disabled, never disabled — so a reader can arrow onto it, be told why it is out, and arrow past. Struck through rather than only faded, because
|
|
181
|
+
A refused date stays focusable — aria-disabled, never disabled — so a reader can arrow onto it, be told why it is out, and arrow past. Struck through rather than only faded, because color alone says nothing under forced colors.
|
|
182
182
|
|
|
183
183
|
Excerpt — not a complete module
|
|
184
184
|
|
package/dist/docs/card.json
CHANGED
|
@@ -130,13 +130,13 @@
|
|
|
130
130
|
"accessibility": [
|
|
131
131
|
"There is no card pattern in the WAI-ARIA Authoring Practices, and a card is structure rather than a widget. The applicable guidance is Structural Roles: use the HTML element that already carries the meaning.",
|
|
132
132
|
"The root is a div with no role. Use render to make it an article with its own heading, a section, the li of a list of results, or the label of a chooser — whichever the page actually means.",
|
|
133
|
-
"The card contributes no keyboard
|
|
133
|
+
"The card contributes no keyboard behavior. CardLink is an anchor, so Enter, the context menu and middle-click are the platform’s.",
|
|
134
134
|
"CardLink is named by its own text. A card whose root were the link would take every string inside it into that name, which is the reason the hit area is stretched from the link instead.",
|
|
135
135
|
"A card carries at most one CardLink, and it navigates. A whole surface that fires a command on any click, with no visible control boundary, is a misclick nobody can undo; put a button in CardActions or the footer instead.",
|
|
136
136
|
"CardActions and CardFooter both sit above the stretched hit area, so a control in either stays operable. An interactive element anywhere else needs position: relative of its own.",
|
|
137
137
|
"Text over the stretched area cannot be selected with the pointer. That is the cost of the whole-card target, and the reason a card with no CardLink stretches nothing.",
|
|
138
138
|
"selected and disabled are painted, never announced. The radio, checkbox or button inside the card is what carries the state for assistive technology.",
|
|
139
|
-
"selected is the accent surface under a hairline accent edge, the pair a selected row paints. In high contrast and forced
|
|
139
|
+
"selected is the accent surface under a hairline accent edge, the pair a selected row paints. In high contrast and forced colors both flatten, and the checked control inside is what carries the state. elevated keeps its hairline because a shadow is removed there outright.",
|
|
140
140
|
"The focus ring is drawn on the card while the link has focus. In a browser without :has() the link keeps its own native outline instead.",
|
|
141
141
|
"A rule between two regions is a Divider written between them. It is announced as a separator unless it is marked decorative, which is usually what a rule inside one card is."
|
|
142
142
|
]
|
package/dist/docs/card.md
CHANGED
|
@@ -51,13 +51,13 @@ Excerpt — not a complete module
|
|
|
51
51
|
|
|
52
52
|
- There is no card pattern in the WAI-ARIA Authoring Practices, and a card is structure rather than a widget. The applicable guidance is Structural Roles: use the HTML element that already carries the meaning.
|
|
53
53
|
- The root is a div with no role. Use render to make it an article with its own heading, a section, the li of a list of results, or the label of a chooser — whichever the page actually means.
|
|
54
|
-
- The card contributes no keyboard
|
|
54
|
+
- The card contributes no keyboard behavior. CardLink is an anchor, so Enter, the context menu and middle-click are the platform’s.
|
|
55
55
|
- CardLink is named by its own text. A card whose root were the link would take every string inside it into that name, which is the reason the hit area is stretched from the link instead.
|
|
56
56
|
- A card carries at most one CardLink, and it navigates. A whole surface that fires a command on any click, with no visible control boundary, is a misclick nobody can undo; put a button in CardActions or the footer instead.
|
|
57
57
|
- CardActions and CardFooter both sit above the stretched hit area, so a control in either stays operable. An interactive element anywhere else needs position: relative of its own.
|
|
58
58
|
- Text over the stretched area cannot be selected with the pointer. That is the cost of the whole-card target, and the reason a card with no CardLink stretches nothing.
|
|
59
59
|
- selected and disabled are painted, never announced. The radio, checkbox or button inside the card is what carries the state for assistive technology.
|
|
60
|
-
- selected is the accent surface under a hairline accent edge, the pair a selected row paints. In high contrast and forced
|
|
60
|
+
- selected is the accent surface under a hairline accent edge, the pair a selected row paints. In high contrast and forced colors both flatten, and the checked control inside is what carries the state. elevated keeps its hairline because a shadow is removed there outright.
|
|
61
61
|
- The focus ring is drawn on the card while the link has focus. In a browser without :has() the link keeps its own native outline instead.
|
|
62
62
|
- A rule between two regions is a Divider written between them. It is announced as a separator unless it is marked decorative, which is usually what a rule inside one card is.
|
|
63
63
|
|
package/dist/docs/carousel.json
CHANGED
|
@@ -370,7 +370,7 @@
|
|
|
370
370
|
"title": "Playground",
|
|
371
371
|
"note": "A slideshow of the workshop’s pieces with every axis below the canvas. Press next, drag with the mouse, swipe on a touch screen, or focus the viewport and use the arrows: the dots, the counter and the slide names follow.",
|
|
372
372
|
"language": "tsx",
|
|
373
|
-
"source": "<Carousel aria-label=\"
|
|
373
|
+
"source": "<Carousel aria-label=\"Autumn Collection\">\n <CarouselViewport>\n {pieces.map((piece) => (\n <CarouselSlide key={piece.name}>\n <Image alt={piece.name} ratio=\"landscape\" src={piece.image} />\n </CarouselSlide>\n ))}\n </CarouselViewport>\n <CarouselPrevious />\n <CarouselNext />\n <CarouselControls>\n <CarouselIndicators />\n <CarouselCounter />\n </CarouselControls>\n</Carousel>;\n",
|
|
374
374
|
"verdict": "excerpt"
|
|
375
375
|
},
|
|
376
376
|
{
|
|
@@ -391,10 +391,10 @@
|
|
|
391
391
|
},
|
|
392
392
|
{
|
|
393
393
|
"id": "align",
|
|
394
|
-
"title": "
|
|
395
|
-
"note": "align=\"center\" makes every slide a page and
|
|
394
|
+
"title": "Centerd, with the neighbours showing",
|
|
395
|
+
"note": "align=\"center\" makes every slide a page and centers it; --slotted-carousel-peek pads the viewport so the slides either side show at its edges. Press a slide that peeks and it comes to the center.",
|
|
396
396
|
"language": "tsx",
|
|
397
|
-
"source": "<Carousel align=\"center\" aria-label=\"
|
|
397
|
+
"source": "<Carousel align=\"center\" aria-label=\"One-of-a-kind pieces\" className=\"peek\">\n <CarouselViewport>{slides}</CarouselViewport>\n <CarouselPrevious />\n <CarouselNext />\n</Carousel>;\n\n/* .peek { --slotted-carousel-peek: 2.5rem; } */\n",
|
|
398
398
|
"verdict": "excerpt"
|
|
399
399
|
},
|
|
400
400
|
{
|
|
@@ -424,7 +424,7 @@
|
|
|
424
424
|
{
|
|
425
425
|
"id": "thumbnails",
|
|
426
426
|
"title": "A product gallery",
|
|
427
|
-
"note": "variant=\"thumbnails\" with a function child draws each indicator from the consumer’s picture. The strip scrolls on its own when it holds more than it shows, and keeps the current picture in view — one carousel, nothing to
|
|
427
|
+
"note": "variant=\"thumbnails\" with a function child draws each indicator from the consumer’s picture. The strip scrolls on its own when it holds more than it shows, and keeps the current picture in view — one carousel, nothing to synchronize.",
|
|
428
428
|
"language": "tsx",
|
|
429
429
|
"source": "<CarouselIndicators aria-label=\"Fotografias\" variant=\"thumbnails\">\n {(page) => (\n <CarouselIndicator key={page} page={page}>\n <img alt={photos[page].alt} src={photos[page].thumbnail} />\n </CarouselIndicator>\n )}\n</CarouselIndicators>;\n",
|
|
430
430
|
"verdict": "excerpt"
|
|
@@ -450,7 +450,7 @@
|
|
|
450
450
|
"title": "Past the last page",
|
|
451
451
|
"note": "loop sends next on the last page to the first and previous on the first to the last; the track travels back rather than cloning a slide, so ids, focus and form state stay single. Without it the controls at the ends say they have nowhere to go.",
|
|
452
452
|
"language": "tsx",
|
|
453
|
-
"source": "<Carousel aria-label=\"
|
|
453
|
+
"source": "<Carousel aria-label=\"Collection\" loop>\n …\n</Carousel>;\n",
|
|
454
454
|
"verdict": "excerpt"
|
|
455
455
|
},
|
|
456
456
|
{
|
|
@@ -458,7 +458,7 @@
|
|
|
458
458
|
"title": "A page the application owns",
|
|
459
459
|
"note": "page and onPageChange make the page the application’s; the request carries the reason — pointer, keyboard, scroll, timeout, resize, programmatic. The buttons outside the carousel move it through the same state, and the log shows each request.",
|
|
460
460
|
"language": "tsx",
|
|
461
|
-
"source": "const [page, setPage] = useState(0);\n\n<Carousel\n aria-label=\"
|
|
461
|
+
"source": "const [page, setPage] = useState(0);\n\n<Carousel\n aria-label=\"Collection\"\n page={page}\n onPageChange={(next, request) => {\n log(request.reason);\n setPage(next);\n }}\n>\n …\n</Carousel>;\n",
|
|
462
462
|
"verdict": "excerpt"
|
|
463
463
|
},
|
|
464
464
|
{
|
|
@@ -482,15 +482,15 @@
|
|
|
482
482
|
"title": "Nothing yet, and loading",
|
|
483
483
|
"note": "With no slide the controls are disabled and the counter reads 0 / 0; the empty state is a result-state the consumer puts in the viewport. While the pieces load, skeleton slides with the same anatomy hold the height.",
|
|
484
484
|
"language": "tsx",
|
|
485
|
-
"source": "<Carousel aria-label=\"
|
|
485
|
+
"source": "<Carousel aria-label=\"Collection\">\n <CarouselViewport>\n {pieces.length === 0 ? (\n <ResultState status=\"empty\">\n <ResultStateContent>\n <ResultStateTitle>No pieces in this collection</ResultStateTitle>\n </ResultStateContent>\n </ResultState>\n ) : (\n slides\n )}\n </CarouselViewport>\n</Carousel>;\n",
|
|
486
486
|
"verdict": "excerpt"
|
|
487
487
|
},
|
|
488
488
|
{
|
|
489
489
|
"id": "composition",
|
|
490
490
|
"title": "Inside a product page",
|
|
491
|
-
"note": "The gallery beside the buy box, as a product page lays them out: the picture and its thumbnails on the start, the name, the price and the action on the end. handleRef.scrollToSlide takes the gallery to the picture of the
|
|
491
|
+
"note": "The gallery beside the buy box, as a product page lays them out: the picture and its thumbnails on the start, the name, the price and the action on the end. handleRef.scrollToSlide takes the gallery to the picture of the color chosen.",
|
|
492
492
|
"language": "tsx",
|
|
493
|
-
"source": "const gallery = useRef<CarouselHandle>(null);\n\n<>\n <Carousel aria-label=\"Fotografias\" handleRef={gallery}>\n …\n </Carousel>\n <SegmentedControl\n aria-label=\"Cor\"\n onValueChange={(
|
|
493
|
+
"source": "const gallery = useRef<CarouselHandle>(null);\n\n<>\n <Carousel aria-label=\"Fotografias\" handleRef={gallery}>\n …\n </Carousel>\n <SegmentedControl\n aria-label=\"Cor\"\n onValueChange={(color) => gallery.current?.scrollToSlide(photoOf(color))}\n >\n …\n </SegmentedControl>\n</>;\n",
|
|
494
494
|
"verdict": "excerpt"
|
|
495
495
|
},
|
|
496
496
|
{
|
|
@@ -498,7 +498,7 @@
|
|
|
498
498
|
"title": "The keyboard",
|
|
499
499
|
"note": "Tab reaches the rotation control, the viewport, the arrows and then one tab stop in the dots. In the viewport the arrows, PageUp, PageDown, Home and End move a page; in the dots the arrows move and show, and stop at the ends. Holding a key moves without animating.",
|
|
500
500
|
"language": "tsx",
|
|
501
|
-
"source": "<Carousel aria-label=\"
|
|
501
|
+
"source": "<Carousel aria-label=\"Collection\">\n <CarouselViewport>{slides}</CarouselViewport>\n <CarouselControls>\n <CarouselIndicators />\n </CarouselControls>\n</Carousel>;\n",
|
|
502
502
|
"verdict": "excerpt"
|
|
503
503
|
}
|
|
504
504
|
]
|