bestax-mcp 1.18.71 → 1.18.73
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/data/bulma-classes.json +4 -1
- package/data/catalog.json +13 -13
- package/data/components/Autocomplete.json +15 -2
- package/data/components/Box.json +3 -3
- package/data/components/Button.json +6 -3
- package/data/components/Buttons.json +4 -4
- package/data/components/Calendar.json +2 -2
- package/data/components/Carousel.json +20 -20
- package/data/components/Cascader.json +1 -1
- package/data/components/Combobox.json +1 -1
- package/data/components/ContextMenu.json +1 -1
- package/data/components/CopyButton.json +1 -1
- package/data/components/DateInput.json +3 -3
- package/data/components/DateRangeInput.json +3 -3
- package/data/components/DateTimeInput.json +3 -3
- package/data/components/Dialog.json +13 -4
- package/data/components/Dropdown.json +1 -1
- package/data/components/Fieldset.json +5 -5
- package/data/components/FloatButton.json +2 -2
- package/data/components/Hero.json +2 -2
- package/data/components/IconButton.json +1 -1
- package/data/components/Input.json +2 -2
- package/data/components/Level.json +4 -4
- package/data/components/LinkButton.json +1 -1
- package/data/components/LocaleProvider.json +1 -1
- package/data/components/Modal.json +11 -2
- package/data/components/Navbar.json +2 -2
- package/data/components/Notification.json +10 -1
- package/data/components/Numberinput.json +14 -1
- package/data/components/Panel.json +1 -1
- package/data/components/Popover.json +1 -1
- package/data/components/Pre.json +32 -4
- package/data/components/Rate.json +15 -2
- package/data/components/Slider.json +6 -6
- package/data/components/Switch.json +14 -1
- package/data/components/Tabs.json +1 -1
- package/data/components/Taginput.json +1 -1
- package/data/components/TimeInput.json +3 -3
- package/data/components/Toast.json +20 -2
- package/data/components/Tour.json +3 -3
- package/data/components/TreeSelect.json +1 -1
- package/data/skills/bestax-custom-component/references/component-catalog.md +1 -1
- package/data/skills/bestax-form/SKILL.md +18 -8
- package/data/skills/bestax-form/references/api.md +7 -5
- package/data/skills/bestax-form/references/patterns.md +6 -2
- package/data/skills/bestax-layout-scaffold/examples/centered.tsx +3 -6
- package/data/skills/bestax-migrate/references/bulma-classes/prop-map.md +3 -1
- package/data/skills/bestax-migrate/references/bulma-classes/unmappables.md +5 -2
- package/data/skills/bestax-optimize/references/modular-build.md +41 -17
- package/data/skills/bestax-theming/references/css-variables.md +5 -0
- package/data/skills/bestax-theming/references/themeable-components.md +4 -4
- package/dist/bulma-classes.d.ts +6 -0
- package/dist/bulma-classes.d.ts.map +1 -1
- package/dist/bulma-classes.js +2 -0
- package/package.json +2 -2
package/data/bulma-classes.json
CHANGED
|
@@ -87,7 +87,10 @@
|
|
|
87
87
|
"is-large": { "writes": [{ "prop": "size", "value": "large" }] },
|
|
88
88
|
"is-light": { "writes": [{ "prop": "isLight" }] },
|
|
89
89
|
"is-rounded": { "writes": [{ "prop": "isRounded" }] },
|
|
90
|
-
"is-loading": {
|
|
90
|
+
"is-loading": {
|
|
91
|
+
"writes": [{ "prop": "isLoading" }],
|
|
92
|
+
"overridesAttrs": ["aria-busy", "aria-disabled"]
|
|
93
|
+
},
|
|
91
94
|
"is-static": { "writes": [{ "prop": "isStatic" }] },
|
|
92
95
|
"is-fullwidth": { "writes": [{ "prop": "isFullwidth" }] },
|
|
93
96
|
"is-outlined": { "writes": [{ "prop": "isOutlined" }] },
|
package/data/catalog.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"generatedFrom": {
|
|
4
4
|
"package": "@allxsmith/bestax-bulma",
|
|
5
|
-
"version": "5.
|
|
5
|
+
"version": "5.75.0"
|
|
6
6
|
},
|
|
7
7
|
"docsBase": "https://bestax.io/docs",
|
|
8
8
|
"categories": [
|
|
@@ -209,8 +209,8 @@
|
|
|
209
209
|
"slug": "form/autocomplete",
|
|
210
210
|
"import": "import { Autocomplete } from '@allxsmith/bestax-bulma';",
|
|
211
211
|
"compound": false,
|
|
212
|
-
"propCount":
|
|
213
|
-
"exampleCount":
|
|
212
|
+
"propCount": 38,
|
|
213
|
+
"exampleCount": 13
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
"name": "Avatar",
|
|
@@ -260,7 +260,7 @@
|
|
|
260
260
|
"name": "Box",
|
|
261
261
|
"kind": "component",
|
|
262
262
|
"category": "elements",
|
|
263
|
-
"purpose": "The `Box` component renders a
|
|
263
|
+
"purpose": "The `Box` component renders a padded container with rounded corners and an optional shadow using Bulma's `.box` class.",
|
|
264
264
|
"slug": "elements/box",
|
|
265
265
|
"import": "import { Box } from '@allxsmith/bestax-bulma';",
|
|
266
266
|
"compound": false,
|
|
@@ -1045,7 +1045,7 @@
|
|
|
1045
1045
|
"slug": "components/modal",
|
|
1046
1046
|
"import": "import { Modal, ModalBackground, ModalContent, ModalClose, ModalCard, ModalCardHead, ModalCardTitle, ModalCardBody, ModalCardFoot } from '@allxsmith/bestax-bulma';",
|
|
1047
1047
|
"compound": true,
|
|
1048
|
-
"propCount":
|
|
1048
|
+
"propCount": 24,
|
|
1049
1049
|
"exampleCount": 10
|
|
1050
1050
|
},
|
|
1051
1051
|
{
|
|
@@ -1067,7 +1067,7 @@
|
|
|
1067
1067
|
"slug": "elements/notification",
|
|
1068
1068
|
"import": "import { Notification, NotificationContainer, notification } from '@allxsmith/bestax-bulma';",
|
|
1069
1069
|
"compound": false,
|
|
1070
|
-
"propCount":
|
|
1070
|
+
"propCount": 8,
|
|
1071
1071
|
"exampleCount": 7
|
|
1072
1072
|
},
|
|
1073
1073
|
{
|
|
@@ -1089,8 +1089,8 @@
|
|
|
1089
1089
|
"slug": "form/numberinput",
|
|
1090
1090
|
"import": "import { Numberinput } from '@allxsmith/bestax-bulma';",
|
|
1091
1091
|
"compound": false,
|
|
1092
|
-
"propCount":
|
|
1093
|
-
"exampleCount":
|
|
1092
|
+
"propCount": 26,
|
|
1093
|
+
"exampleCount": 13
|
|
1094
1094
|
},
|
|
1095
1095
|
{
|
|
1096
1096
|
"name": "OrderedList",
|
|
@@ -1243,8 +1243,8 @@
|
|
|
1243
1243
|
"slug": "form/rate",
|
|
1244
1244
|
"import": "import { Rate } from '@allxsmith/bestax-bulma';",
|
|
1245
1245
|
"compound": false,
|
|
1246
|
-
"propCount":
|
|
1247
|
-
"exampleCount":
|
|
1246
|
+
"propCount": 29,
|
|
1247
|
+
"exampleCount": 13
|
|
1248
1248
|
},
|
|
1249
1249
|
{
|
|
1250
1250
|
"name": "Reveal",
|
|
@@ -1441,8 +1441,8 @@
|
|
|
1441
1441
|
"slug": "form/switch",
|
|
1442
1442
|
"import": "import { Switch } from '@allxsmith/bestax-bulma';",
|
|
1443
1443
|
"compound": false,
|
|
1444
|
-
"propCount":
|
|
1445
|
-
"exampleCount":
|
|
1444
|
+
"propCount": 10,
|
|
1445
|
+
"exampleCount": 12
|
|
1446
1446
|
},
|
|
1447
1447
|
{
|
|
1448
1448
|
"name": "Table",
|
|
@@ -1573,7 +1573,7 @@
|
|
|
1573
1573
|
"slug": "components/toast",
|
|
1574
1574
|
"import": "import { Toast, ToastContainer, toast } from '@allxsmith/bestax-bulma';",
|
|
1575
1575
|
"compound": false,
|
|
1576
|
-
"propCount":
|
|
1576
|
+
"propCount": 18,
|
|
1577
1577
|
"exampleCount": 7
|
|
1578
1578
|
},
|
|
1579
1579
|
{
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
"title": "With Clear Button",
|
|
18
18
|
"code": "function example() {\n const options = ['Option 1', 'Option 2', 'Option 3', 'Option 4'];\n\n return (\n <Autocomplete data={options} placeholder=\"Search options...\" clearable />\n );\n}"
|
|
19
19
|
},
|
|
20
|
+
{
|
|
21
|
+
"title": "Clear Button in Another Language",
|
|
22
|
+
"code": "function example() {\n const [value, setValue] = useState('Pomme');\n\n return (\n <Autocomplete\n label=\"Fruit\"\n data={['Pomme', 'Poire', 'Prune']}\n placeholder=\"Chercher un fruit\"\n value={value}\n onInput={setValue}\n clearable\n labels={{ clear: 'Effacer' }}\n />\n );\n}"
|
|
23
|
+
},
|
|
20
24
|
{
|
|
21
25
|
"title": "Color and Size Variants",
|
|
22
26
|
"code": "<Block display=\"flex\" flexDirection=\"column\">\n <Autocomplete\n data={['Apple', 'Banana', 'Cherry']}\n placeholder=\"Primary small\"\n color=\"primary\"\n size=\"small\"\n />\n <Autocomplete\n data={['Apple', 'Banana', 'Cherry']}\n placeholder=\"Info normal\"\n color=\"info\"\n />\n <Autocomplete\n data={['Apple', 'Banana', 'Cherry']}\n placeholder=\"Success medium\"\n color=\"success\"\n size=\"medium\"\n />\n <Autocomplete\n data={['Apple', 'Banana', 'Cherry']}\n placeholder=\"Danger large\"\n color=\"danger\"\n size=\"large\"\n />\n</Block>"
|
|
@@ -54,7 +58,7 @@
|
|
|
54
58
|
"code": "function example() {\n return (\n <Field\n horizontal\n label=\"Fruit\"\n labelProps={{\n htmlFor: 'fruit-field-control',\n id: 'fruit-field-control-label',\n }}\n >\n <Field.Body>\n <Field>\n <Control iconLeftName=\"search\">\n <Autocomplete\n id=\"fruit-field-control\"\n data={['Apple', 'Banana', 'Cherry']}\n placeholder=\"Search fruit...\"\n />\n </Control>\n </Field>\n </Field.Body>\n </Field>\n );\n}"
|
|
55
59
|
}
|
|
56
60
|
],
|
|
57
|
-
"accessibility": "- The `label` prop is automatically associated with the inner text input (`htmlFor` plus a generated `id`, or your own `id` if you pass one), so clicking the label focuses the input and assistive technology announces it. Inside a labeled `Field`, that `Field`'s label names the input instead when it points at it: a `Field` that is not `grouped` or `hasAddons` points it there on its own when the Autocomplete has no `id` and no inner `Field` sits between them, and a label you wire by hand with `labelProps.htmlFor` points at the input with that `id`.\n- A user-supplied `id` is applied to the inner input (the labellable control), not the wrapper div.\n- Uses `role=\"combobox\"` with `aria-expanded`, which is true only while the list is on screen. When nothing matches, the dropdown shows the `empty` content but no list, so it stays false\n- Has `aria-haspopup=\"listbox\"` and `aria-autocomplete=\"list\"`, and, while the list is on screen, `aria-controls` pointing at it\n- Focus stays in the input, which points `aria-activedescendant` at the highlighted option as the arrow keys move it. Clicking an option leaves focus in the input too, with the picked value in it\n- The list is a `role=\"listbox\"` named through `aria-labelledby` by the label that names the input, when that label has an id: the `label` prop's label always has one, and so does a `Field`'s label that the `Field` wires itself. A `Field` label you wire by hand with `labelProps.htmlFor`, which is how a horizontal form names an Autocomplete in an inner `Field`, needs an `id` in its `labelProps` as well. Otherwise the list falls back to `aria-label=\"Suggestions\"`\n- The list holds only the options. The `header`, `footer` and `empty` content sit beside it in the dropdown, so a screen reader doesn't count them as options\n- When the user's typing leaves nothing that matches, the `empty` text is announced through a polite `role=\"status\"` region. That region is in the page from the start, so it's there before the message arrives. It's said once each time the matches run out, not again on every keystroke while they stay out, and the next search that comes up empty is announced too: after matches come back, after the field is emptied, or after the list closes and the user types again\n- While `loading` is on, or a `Control` with `isLoading` around the Autocomplete, the announcement waits, so the `empty` text that shows while results are on their way isn't read out. It's said once loading ends with nothing matching, for each search that comes back empty. Pass `loading` while you fetch results, as the async story in Storybook does\n- Focusing the field, opening the list with `openOnFocus` or `↓`, or emptying the field announces nothing. Without `empty`, nothing is announced at all, since there's no built-in message to say\n- `empty` is a message, so keep it to text. `Tab` closes the list, so a keyboard user can't reach a link or a button in it\n- Keep that message static, like \"No results found\". Its text is read when the matches first run out and isn't read again while they stay out, so a message that names the query, like \"No results for xyz\", is only heard for the query that ran them out\n- Dropdown items use `role=\"option\"`, and the highlighted one is `aria-selected` unless it's disabled\n- In forced colors (Windows' contrast themes), which take away the dropdown's shadow and the highlighted option's fill, the open dropdown is drawn with an edge, whether it shows options or the `empty` content, and the highlighted option with an outline in the system's highlight color\n- Disabled items have `aria-disabled`\n- The `clearable` clear button is a native button named \"Clear\"
|
|
61
|
+
"accessibility": "- The `label` prop is automatically associated with the inner text input (`htmlFor` plus a generated `id`, or your own `id` if you pass one), so clicking the label focuses the input and assistive technology announces it. Inside a labeled `Field`, that `Field`'s label names the input instead when it points at it: a `Field` that is not `grouped` or `hasAddons` points it there on its own when the Autocomplete has no `id` and no inner `Field` sits between them, and a label you wire by hand with `labelProps.htmlFor` points at the input with that `id`.\n- A user-supplied `id` is applied to the inner input (the labellable control), not the wrapper div.\n- Uses `role=\"combobox\"` with `aria-expanded`, which is true only while the list is on screen. When nothing matches, the dropdown shows the `empty` content but no list, so it stays false\n- Has `aria-haspopup=\"listbox\"` and `aria-autocomplete=\"list\"`, and, while the list is on screen, `aria-controls` pointing at it\n- Focus stays in the input, which points `aria-activedescendant` at the highlighted option as the arrow keys move it. Clicking an option leaves focus in the input too, with the picked value in it\n- The list is a `role=\"listbox\"` named through `aria-labelledby` by the label that names the input, when that label has an id: the `label` prop's label always has one, and so does a `Field`'s label that the `Field` wires itself. A `Field` label you wire by hand with `labelProps.htmlFor`, which is how a horizontal form names an Autocomplete in an inner `Field`, needs an `id` in its `labelProps` as well. Otherwise the list falls back to `aria-label=\"Suggestions\"`\n- The list holds only the options. The `header`, `footer` and `empty` content sit beside it in the dropdown, so a screen reader doesn't count them as options\n- When the user's typing leaves nothing that matches, the `empty` text is announced through a polite `role=\"status\"` region. That region is in the page from the start, so it's there before the message arrives. It's said once each time the matches run out, not again on every keystroke while they stay out, and the next search that comes up empty is announced too: after matches come back, after the field is emptied, or after the list closes and the user types again\n- While `loading` is on, or a `Control` with `isLoading` around the Autocomplete, the announcement waits, so the `empty` text that shows while results are on their way isn't read out. It's said once loading ends with nothing matching, for each search that comes back empty. Pass `loading` while you fetch results, as the async story in Storybook does\n- Focusing the field, opening the list with `openOnFocus` or `↓`, or emptying the field announces nothing. Without `empty`, nothing is announced at all, since there's no built-in message to say\n- `empty` is a message, so keep it to text. `Tab` closes the list, so a keyboard user can't reach a link or a button in it\n- Keep that message static, like \"No results found\". Its text is read when the matches first run out and isn't read again while they stay out, so a message that names the query, like \"No results for xyz\", is only heard for the query that ran them out\n- Dropdown items use `role=\"option\"`, and the highlighted one is `aria-selected` unless it's disabled\n- In forced colors (Windows' contrast themes), which take away the dropdown's shadow and the highlighted option's fill, the open dropdown is drawn with an edge, whether it shows options or the `empty` content, and the highlighted option with an outline in the system's highlight color\n- Disabled items have `aria-disabled`\n- The `clearable` clear button is a native button named \"Clear\", or `labels.clear`: `Tab` from the input reaches it, and `Enter` or `Space` clears the input and puts focus back in it\n- Full keyboard navigation support\n- The `message` describes the input through `aria-describedby`, so a screen reader reads it when the input takes focus.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the wrapper, so a screen reader hears the input is invalid when it takes focus.",
|
|
58
62
|
"related": ["Combobox", "Input", "Select", "Taginput"],
|
|
59
63
|
"storybook": "https://bestax.io/storybook/?path=/story/form-autocomplete",
|
|
60
64
|
"summary": "The `Autocomplete` component provides an input field with dropdown suggestions that filter based on user input.",
|
|
@@ -144,7 +148,16 @@
|
|
|
144
148
|
"name": "clearable",
|
|
145
149
|
"type": "boolean",
|
|
146
150
|
"default": "false",
|
|
147
|
-
"description": "Whether to show a clear button while the input holds a value. It hides while the input is disabled, and gives way to a loading spinner at the same right edge: the one `loading` draws, or that of a `Control` with `isLoading` around the Autocomplete.",
|
|
151
|
+
"description": "Whether to show a clear button while the input holds a value. It hides while the input is disabled, and gives way to a loading spinner at the same right edge: the one `loading` draws, or that of a `Control` with `isLoading` around the Autocomplete. It's named \"Clear\", or `labels.clear`.",
|
|
152
|
+
"required": false,
|
|
153
|
+
"inherited": false,
|
|
154
|
+
"deprecated": false
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "labels",
|
|
158
|
+
"type": "{ clear?: string }",
|
|
159
|
+
"default": null,
|
|
160
|
+
"description": "The clear button's name, in your app's language.",
|
|
148
161
|
"required": false,
|
|
149
162
|
"inherited": false,
|
|
150
163
|
"deprecated": false
|
package/data/components/Box.json
CHANGED
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"code": "<Box textColor=\"success\" bgColor=\"black\" m=\"3\" p=\"3\" textAlign=\"right\">\n Interactive Box\n</Box>"
|
|
36
36
|
}
|
|
37
37
|
],
|
|
38
|
-
"accessibility": "- **Content:** Use semantic HTML inside `Box` for best accessibility.\n- **Shadow:** The shadow is purely visual and does not affect accessibility.\n- **Contrast:** Ensure color combinations provide sufficient contrast.\n\n:::tip\n`Box` is perfect for card-like containers, callouts, or visually separating content.\n:::",
|
|
38
|
+
"accessibility": "- **Content:** Use semantic HTML inside `Box` for best accessibility.\n- **Shadow:** The shadow is purely visual and does not affect accessibility.\n- **Forced colors:** in Windows' contrast themes, which drop shadows and paint the box in the\n page's own color, the box's edge is drawn as an outline in the system's text color, so it still\n shows where its content starts and ends. While the box has keyboard focus, the browser's focus\n ring shows in its place.\n- **Contrast:** Ensure color combinations provide sufficient contrast.\n\n:::tip\n`Box` is perfect for card-like containers, callouts, or visually separating content.\n:::",
|
|
39
39
|
"related": ["Block", "Content", "useBulmaClasses"],
|
|
40
40
|
"storybook": "https://bestax.io/storybook/?path=/story/elements-box--default",
|
|
41
|
-
"summary": "The `Box` component renders a
|
|
41
|
+
"summary": "The `Box` component renders a padded container with rounded corners and an optional shadow using Bulma's `.box` class.",
|
|
42
42
|
"import": "import { Box } from '@allxsmith/bestax-bulma';",
|
|
43
43
|
"sourceFile": "bulma-ui/src/elements/Box.tsx",
|
|
44
44
|
"rootClass": "box",
|
|
45
45
|
"parts": [
|
|
46
46
|
{
|
|
47
47
|
"path": "Box",
|
|
48
|
-
"summary": "The `Box` component renders a
|
|
48
|
+
"summary": "The `Box` component renders a padded container with rounded corners and an optional shadow using Bulma's `.box` class.",
|
|
49
49
|
"component": null,
|
|
50
50
|
"props": [
|
|
51
51
|
{
|
|
@@ -30,7 +30,10 @@
|
|
|
30
30
|
"title": "Loading",
|
|
31
31
|
"code": "<Button color=\"success\" isLoading>\n Loading Button\n</Button>"
|
|
32
32
|
},
|
|
33
|
-
{
|
|
33
|
+
{
|
|
34
|
+
"title": "Static",
|
|
35
|
+
"code": "<Button as=\"span\" isStatic>\n Static Button\n</Button>"
|
|
36
|
+
},
|
|
34
37
|
{
|
|
35
38
|
"title": "Full Width",
|
|
36
39
|
"code": "<Button color=\"warning\" isFullwidth>\n Full Width Button\n</Button>"
|
|
@@ -101,7 +104,7 @@
|
|
|
101
104
|
"code": "function example() {\n const buttonRef = React.useRef<HTMLButtonElement>(null);\n const [tag, setTag] = React.useState<string>();\n\n return (\n <>\n <Button color=\"primary\" ref={buttonRef}>\n Target\n </Button>\n <Button ml=\"2\" onClick={() => setTag(buttonRef.current?.tagName)}>\n Read the tag from its ref\n </Button>\n <p>Rendered element: {tag ?? '—'}</p>\n </>\n );\n}"
|
|
102
105
|
}
|
|
103
106
|
],
|
|
104
|
-
"accessibility": "- **Labeling:** Always provide descriptive content for buttons for screen readers.\n- **Icons beside text:** Leave the `Icon` unnamed, so the text alone names the button. The icons in [With an Icon](https://bestax.io/docs/api/elements/button#with-an-icon) write out `aria-hidden=\"true\"`, and `Icon` would render it for them anyway, since they have no `ariaLabel`, `aria-label` or `aria-labelledby` to name them and no `role` or `tabIndex` of their own. A named icon joins the button's name instead, so `ariaLabel=\"Download\"` on the icon of a Download button makes a screen reader announce \"Download Download\".\n- **States:** The `isDisabled` and `disabled` props ensure correct `aria-disabled` and `disabled` attributes.\n- **Loading:** while `isLoading` is set, the button carries `aria-busy=\"true\"` and `aria-disabled=\"true\"`, so a screen reader can tell it won't respond, and a click, <kbd>Enter</kbd> or <kbd>Space</kbd> does nothing: `onClick` doesn't run, a submit button doesn't submit its form, and a click on a link doesn't follow its `href`. It keeps focus, since `aria-disabled` doesn't take it away the way `disabled` would.\n- **Keyboard:** When rendered as `<a>`, disabled buttons are not focusable.\n- **Focus:** Use `isFocused` and `isActive` for visual feedback, but rely on browser focus for actual accessibility.\n- **Focus ring:** Bulma shows a focused button with its border and a shadow. A ghost button has neither. A loading or static one has no shadow. All a loading one keeps is its border turning the focus color, which on a colored one is drawn on its own fill, and a loading outlined or text one, or a static one, doesn't change at all. Forced colors (Windows' contrast themes) drops the shadow and sets the border's color. So bestax's styles give a focused ghost, loading or static button, and every focused button in forced colors, an outline. `isFocused` draws it too.\n- **Forced colors:** In Windows' contrast themes a colored button keeps a 1px border, so it still has an edge when the theme replaces its fill, while an outlined button and a `text` one are left as they are. A button with Bulma's `is-selected`, such as a pressed [`ToggleButton`](https://bestax.io/docs/api/elements/togglebutton) or the selected button of a `Buttons hasAddons` row, is drawn in the system's highlight colors there, since the fill that marks it is replaced, and a disabled one in the system's color for a disabled control, filled.\n- **Outlined on the dark scheme:** bestax's styles draw an outlined button's label and border at the lightness Bulma picks for its color's text on the page wherever that's lighter than the color's own, so a dark color, such as Bulma's link or bestax's blue primary, reads on the dark page. On a light page an outlined button keeps its color's own lightness. On a surface that stays light on both schemes, such as `bgColor=\"white\"`, give the surface Bulma's `theme-light` class (`bestax-theme-light` under the `bestax-` prefix), which keeps what's inside it on the light scheme's values.\n- **Toggles:** `isActive` tells a screen reader nothing. A button that turns something on or off is a [`ToggleButton`](https://bestax.io/docs/api/elements/togglebutton), which sets `aria-pressed`.\n\n:::note\nA button that shows only an icon is an [`IconButton`](https://bestax.io/docs/api/elements/iconbutton), whose types require an\n`aria-label` or an `aria-labelledby`, and whose `isRounded` makes a circle. On a plain `Button` holding only\nan icon, name it with `aria-label` yourself.\n:::",
|
|
107
|
+
"accessibility": "- **Labeling:** Always provide descriptive content for buttons for screen readers.\n- **Icons beside text:** Leave the `Icon` unnamed, so the text alone names the button. The icons in [With an Icon](https://bestax.io/docs/api/elements/button#with-an-icon) write out `aria-hidden=\"true\"`, and `Icon` would render it for them anyway, since they have no `ariaLabel`, `aria-label` or `aria-labelledby` to name them and no `role` or `tabIndex` of their own. A named icon joins the button's name instead, so `ariaLabel=\"Download\"` on the icon of a Download button makes a screen reader announce \"Download Download\".\n- **States:** The `isDisabled` and `disabled` props ensure correct `aria-disabled` and `disabled` attributes.\n- **Loading:** while `isLoading` is set, the button carries `aria-busy=\"true\"` and `aria-disabled=\"true\"`, so a screen reader can tell it won't respond, and a click, <kbd>Enter</kbd> or <kbd>Space</kbd> does nothing: `onClick` doesn't run, a submit button doesn't submit its form, and a click on a link doesn't follow its `href`. It keeps focus, since `aria-disabled` doesn't take it away the way `disabled` would.\n- **Keyboard:** When rendered as `<a>`, disabled buttons are not focusable.\n- **Focus:** Use `isFocused` and `isActive` for visual feedback, but rely on browser focus for actual accessibility.\n- **Focus ring:** Bulma shows a focused button with its border and a shadow. A ghost button has neither. A loading or static one has no shadow. All a loading one keeps is its border turning the focus color, which on a colored one is drawn on its own fill, and a loading outlined or text one, or a static one, doesn't change at all. Forced colors (Windows' contrast themes) drops the shadow and sets the border's color. So bestax's styles give a focused ghost, loading or static button, and every focused button in forced colors, an outline. `isFocused` draws it too.\n- **Forced colors:** In Windows' contrast themes a colored button keeps a 1px border, so it still has an edge when the theme replaces its fill, while an outlined button and a `text` one are left as they are. A button with Bulma's `is-selected`, such as a pressed [`ToggleButton`](https://bestax.io/docs/api/elements/togglebutton) or the selected button of a `Buttons hasAddons` row, is drawn in the system's highlight colors there, since the fill that marks it is replaced, and a disabled one in the system's color for a disabled control, filled.\n- **Outlined on the dark scheme:** bestax's styles draw an outlined button's label and border at the lightness Bulma picks for its color's text on the page wherever that's lighter than the color's own, so a dark color, such as Bulma's link or bestax's blue primary, reads on the dark page. On a light page an outlined button keeps its color's own lightness. On a surface that stays light on both schemes, such as `bgColor=\"white\"`, give the surface Bulma's `theme-light` class (`bestax-theme-light` under the `bestax-` prefix), which keeps what's inside it on the light scheme's values.\n- **Static labels:** `isStatic` only styles the button, so a `<button>` with it is still a tab stop that a screen reader announces as a button. Render a label that does nothing, such as an addon's \"@gmail.com\", `as=\"span\"`.\n- **Toggles:** `isActive` tells a screen reader nothing. A button that turns something on or off is a [`ToggleButton`](https://bestax.io/docs/api/elements/togglebutton), which sets `aria-pressed`.\n\n:::note\nA button that shows only an icon is an [`IconButton`](https://bestax.io/docs/api/elements/iconbutton), whose types require an\n`aria-label` or an `aria-labelledby`, and whose `isRounded` makes a circle. On a plain `Button` holding only\nan icon, name it with `aria-label` yourself.\n:::",
|
|
105
108
|
"related": [
|
|
106
109
|
"Buttons",
|
|
107
110
|
"CopyButton",
|
|
@@ -179,7 +182,7 @@
|
|
|
179
182
|
"name": "isStatic",
|
|
180
183
|
"type": "boolean",
|
|
181
184
|
"default": "false",
|
|
182
|
-
"description": "
|
|
185
|
+
"description": "Draws Bulma's static look and stops the pointer. It doesn't change the element: a `<button>` with it is still a tab stop that a screen reader announces as a button and Enter and Space press, and in a form it's a submit button. A label that does nothing, such as \"@gmail.com\" beside an input in a `Field` with addons, is a `Button` rendered `as=\"span\"`, which Tab skips and a screen reader reads as text.",
|
|
183
186
|
"required": false,
|
|
184
187
|
"inherited": false,
|
|
185
188
|
"deprecated": false
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
"name": "isStatic",
|
|
203
203
|
"type": "boolean",
|
|
204
204
|
"default": "false",
|
|
205
|
-
"description": "
|
|
205
|
+
"description": "Draws Bulma's static look and stops the pointer. It doesn't change the element: a `<button>` with it is still a tab stop that a screen reader announces as a button and Enter and Space press, and in a form it's a submit button. A label that does nothing, such as \"@gmail.com\" beside an input in a `Field` with addons, is a `Button` rendered `as=\"span\"`, which Tab skips and a screen reader reads as text.",
|
|
206
206
|
"required": false,
|
|
207
207
|
"inherited": false,
|
|
208
208
|
"deprecated": false
|
|
@@ -396,7 +396,7 @@
|
|
|
396
396
|
"name": "isStatic",
|
|
397
397
|
"type": "boolean",
|
|
398
398
|
"default": "false",
|
|
399
|
-
"description": "
|
|
399
|
+
"description": "Draws Bulma's static look and stops the pointer. It doesn't change the element: a `<button>` with it is still a tab stop that a screen reader announces as a button and Enter and Space press, and in a form it's a submit button. A label that does nothing, such as \"@gmail.com\" beside an input in a `Field` with addons, is a `Button` rendered `as=\"span\"`, which Tab skips and a screen reader reads as text.",
|
|
400
400
|
"required": false,
|
|
401
401
|
"inherited": true,
|
|
402
402
|
"deprecated": false
|
|
@@ -755,7 +755,7 @@
|
|
|
755
755
|
"name": "isStatic",
|
|
756
756
|
"type": "boolean",
|
|
757
757
|
"default": "false",
|
|
758
|
-
"description": "
|
|
758
|
+
"description": "Draws Bulma's static look and stops the pointer. It doesn't change the element: a `<button>` with it is still a tab stop that a screen reader announces as a button and Enter and Space press, and in a form it's a submit button. A label that does nothing, such as \"@gmail.com\" beside an input in a `Field` with addons, is a `Button` rendered `as=\"span\"`, which Tab skips and a screen reader reads as text.",
|
|
759
759
|
"required": false,
|
|
760
760
|
"inherited": true,
|
|
761
761
|
"deprecated": false
|
|
@@ -994,7 +994,7 @@
|
|
|
994
994
|
"name": "isStatic",
|
|
995
995
|
"type": "boolean",
|
|
996
996
|
"default": "false",
|
|
997
|
-
"description": "
|
|
997
|
+
"description": "Draws Bulma's static look and stops the pointer. It doesn't change the element: a `<button>` with it is still a tab stop that a screen reader announces as a button and Enter and Space press, and in a form it's a submit button. A label that does nothing, such as \"@gmail.com\" beside an input in a `Field` with addons, is a `Button` rendered `as=\"span\"`, which Tab skips and a screen reader reads as text.",
|
|
998
998
|
"required": false,
|
|
999
999
|
"inherited": true,
|
|
1000
1000
|
"deprecated": false
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"code": "<Calendar\n aria-label=\"Choisir un jour\"\n locale=\"fr-FR\"\n firstDayOfWeek={1}\n labels={{ prevMonth: 'Mois précédent', nextMonth: 'Mois suivant' }}\n/>"
|
|
55
55
|
}
|
|
56
56
|
],
|
|
57
|
-
"accessibility": "- The root is a `<div>`. An `aria-label` or `aria-labelledby` on it names the Calendar and makes it a `role=\"group\"`, and so does a labeled `Field` around it, whose label names it when you give it no name of your own.\n- Each month is a `role=\"grid\"` named by its month and year, its weeks `role=\"row\"`s and its days `button`s with `role=\"gridcell\"`. Picked days are `aria-selected`, and today has `aria-current=\"date\"`.\n- Each day is named by its full date in the Calendar's locale, such as \"Friday, November 20, 2026\", which `getDayLabel` extends. The weekday row is hidden from assistive technology, since every day's name carries its weekday, so moving down a week reads the whole date rather than \"27\". On a server-rendered page the full names arrive once the page hydrates.\n- What `dayTemplate` draws isn't read, since a day's name is its date: pair it with `getDayLabel`.\n- A range's ends are described as \"Start date\" and \"End date\", the day a pending range would end on as \"Choose as end date\", and a polite live region states the range in words as it's picked, as on `DateRangeInput`.\n- `readOnly` puts `aria-readonly=\"true\"` on the grids and keeps the tab stop and the keys. `disabled` puts `aria-disabled=\"true\"` on them and disables every button.\n- `loading` puts `aria-busy=\"true\"` on the grids and keeps the grid and its focus where they were.\n- A roving `tabindex` keeps one day focusable in the whole Calendar, whatever `monthsToShow` is. When the focused day is disabled, the tab stop moves to the nearest enabled day of the months on show.\n- Closing the year list, with a pick or `Escape`, puts focus back on the grid's tab stop.\n- On a right-to-left page the previous-month chevron points right.",
|
|
57
|
+
"accessibility": "- The root is a `<div>`. An `aria-label` or `aria-labelledby` on it names the Calendar and makes it a `role=\"group\"`, and so does a labeled `Field` around it, whose label names it when you give it no name of your own.\n- Each month is a `role=\"grid\"` named by its month and year, its weeks `role=\"row\"`s and its days `button`s with `role=\"gridcell\"`. Picked days are `aria-selected`, and today has `aria-current=\"date\"`.\n- In forced colors (Windows' contrast themes), the fill that marks a picked day, month or year, a range's band, and the year the header's year list is on, is replaced, so bestax's styles draw each of those cells, and every day of a picked range, in the system's highlight colors there, or in the system's color for a disabled control when it's disabled. What `dayTemplate` draws in them takes the same colors, unless it sets its own. While a range's end is still being picked, only its start is filled, and the day it would end on keeps its dashed edge.\n- Each day is named by its full date in the Calendar's locale, such as \"Friday, November 20, 2026\", which `getDayLabel` extends. The weekday row is hidden from assistive technology, since every day's name carries its weekday, so moving down a week reads the whole date rather than \"27\". On a server-rendered page the full names arrive once the page hydrates.\n- What `dayTemplate` draws isn't read, since a day's name is its date: pair it with `getDayLabel`.\n- A range's ends are described as \"Start date\" and \"End date\", the day a pending range would end on as \"Choose as end date\", and a polite live region states the range in words as it's picked, as on `DateRangeInput`.\n- `readOnly` puts `aria-readonly=\"true\"` on the grids and keeps the tab stop and the keys. `disabled` puts `aria-disabled=\"true\"` on them and disables every button.\n- `loading` puts `aria-busy=\"true\"` on the grids and keeps the grid and its focus where they were.\n- A roving `tabindex` keeps one day focusable in the whole Calendar, whatever `monthsToShow` is. When the focused day is disabled, the tab stop moves to the nearest enabled day of the months on show.\n- Closing the year list, with a pick or `Escape`, puts focus back on the grid's tab stop.\n- On a right-to-left page the previous-month chevron points right.",
|
|
58
58
|
"related": ["DateInput", "DateRangeInput", "Fieldset"],
|
|
59
59
|
"storybook": "https://bestax.io/storybook/?path=/story/form-calendar",
|
|
60
60
|
"summary": "The `Calendar` component shows months on the page, not behind an input, where a click picks a day or a range and each day can show what's on it. It's the grid the date pickers draw, with no `Field`, label or hidden input: a form that posts a date uses `DateInput inline` instead.",
|
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
"name": "color",
|
|
288
288
|
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
289
289
|
"default": null,
|
|
290
|
-
"description": "Bulma color for the picked days. Today and the focus ring take its `-on-scheme` variant. Unset, the `--bulma-dateinput-*` variables decide, and they follow `primary`.",
|
|
290
|
+
"description": "Bulma color for the picked days. Today and the focus ring take its `-on-scheme` variant. Unset, the `--bulma-dateinput-*` variables decide, and they follow `primary`. Forced colors (Windows' contrast themes) replaces the fill, so there the picked days are drawn in the system's highlight colors instead, whatever the color, which needs bestax's CSS.",
|
|
291
291
|
"required": false,
|
|
292
292
|
"inherited": true,
|
|
293
293
|
"deprecated": false
|
|
@@ -7,70 +7,70 @@
|
|
|
7
7
|
"examples": [
|
|
8
8
|
{
|
|
9
9
|
"title": "Basic Carousel",
|
|
10
|
-
"code": "<Carousel indicatorStyle=\"dots\">\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 1</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 2</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"danger\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 3</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
10
|
+
"code": "<Carousel ariaLabel=\"Highlights\" indicatorStyle=\"dots\">\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 1</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 2</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"danger\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 3</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"title": "Several Items in View",
|
|
14
|
-
"code": "<Carousel
|
|
14
|
+
"code": "<Carousel\n ariaLabel=\"Rooms\"\n itemsToShow={1}\n itemsToShowTablet={2}\n itemsToShowDesktop={3}\n>\n {[\n 'Garden Room',\n 'Harbor Suite',\n 'Loft',\n 'Courtyard Twin',\n 'Terrace Room',\n 'Family Suite',\n ].map(room => (\n <CarouselItem key={room}>\n <Card m=\"2\">\n <Card.Content>\n <Title as=\"p\" size=\"5\">\n {room}\n </Title>\n <SubTitle as=\"p\" size=\"6\">\n Sleeps two\n </SubTitle>\n </Card.Content>\n </Card>\n </CarouselItem>\n ))}\n</Carousel>"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"title": "Several Items in View › Stepping and indicators",
|
|
18
|
-
"code": "<Carousel itemsToShow={3}
|
|
18
|
+
"code": "<Carousel\n ariaLabel=\"Numbered items\"\n itemsToShow={3}\n itemsToScroll={3}\n repeat={false}\n>\n {[1, 2, 3, 4, 5, 6, 7].map(n => (\n <CarouselItem key={n}>\n <Box m=\"2\" textAlign=\"centered\">\n Item {n}\n </Box>\n </CarouselItem>\n ))}\n</Carousel>"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"title": "Several Items in View › Spacing between items",
|
|
22
|
-
"code": "<Carousel className=\"room-gallery\" itemsToShow={3}>\n {/* items */}\n</Carousel>"
|
|
22
|
+
"code": "<Carousel ariaLabel=\"Room gallery\" className=\"room-gallery\" itemsToShow={3}>\n {/* items */}\n</Carousel>"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"title": "Auto-playing Carousel",
|
|
26
|
-
"code": "<Carousel autoplay interval={3000}>\n <CarouselItem>\n <Hero color=\"info\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Info</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"warning\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Warning</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Success</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
26
|
+
"code": "<Carousel ariaLabel=\"Status colors\" autoplay interval={3000}>\n <CarouselItem>\n <Hero color=\"info\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Info</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"warning\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Warning</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Success</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"title": "Indicator Styles",
|
|
30
|
-
"code": "function IndicatorExample() {\n const [style, setStyle] = useState<'dots' | 'circles' | 'lines' | 'bars'>(\n 'dots'\n );\n return (\n <Block>\n <Buttons mb=\"4\">\n <Button\n onClick={() => setStyle('dots')}\n color={style === 'dots' ? 'primary' : undefined}\n >\n Dots\n </Button>\n <Button\n onClick={() => setStyle('circles')}\n color={style === 'circles' ? 'primary' : undefined}\n >\n Circles\n </Button>\n <Button\n onClick={() => setStyle('lines')}\n color={style === 'lines' ? 'primary' : undefined}\n >\n Lines\n </Button>\n <Button\n onClick={() => setStyle('bars')}\n color={style === 'bars' ? 'primary' : undefined}\n >\n Bars\n </Button>\n </Buttons>\n <Carousel indicatorStyle={style}>\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 1</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 2</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"danger\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 3</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n </Carousel>\n </Block>\n );\n}"
|
|
30
|
+
"code": "function IndicatorExample() {\n const [style, setStyle] = useState<'dots' | 'circles' | 'lines' | 'bars'>(\n 'dots'\n );\n return (\n <Block>\n <Buttons mb=\"4\">\n <Button\n onClick={() => setStyle('dots')}\n color={style === 'dots' ? 'primary' : undefined}\n >\n Dots\n </Button>\n <Button\n onClick={() => setStyle('circles')}\n color={style === 'circles' ? 'primary' : undefined}\n >\n Circles\n </Button>\n <Button\n onClick={() => setStyle('lines')}\n color={style === 'lines' ? 'primary' : undefined}\n >\n Lines\n </Button>\n <Button\n onClick={() => setStyle('bars')}\n color={style === 'bars' ? 'primary' : undefined}\n >\n Bars\n </Button>\n </Buttons>\n <Carousel ariaLabel=\"Indicator styles\" indicatorStyle={style}>\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 1</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 2</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"danger\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 3</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n </Carousel>\n </Block>\n );\n}"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"title": "Indicators Over the Slides",
|
|
34
|
-
"code": "<Carousel indicatorInside>\n <CarouselItem>\n <Hero color=\"dark\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 1</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"link\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 2</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 3</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
34
|
+
"code": "<Carousel ariaLabel=\"Indicators over the slides\" indicatorInside>\n <CarouselItem>\n <Hero color=\"dark\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 1</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"link\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 2</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 3</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"title": "Plain Indicators Over the Slides",
|
|
38
|
-
"code": "<Carousel indicatorInside overlayControls={false}>\n {['Garden Room', 'Harbor Suite', 'Loft', 'Courtyard Twin'].map(room => (\n <CarouselItem key={room}>\n <Card m=\"2\">\n <Card.Content px=\"6\" py=\"6\" textAlign=\"centered\">\n <Title as=\"p\" size=\"5\" mt=\"5\">\n {room}\n </Title>\n <SubTitle as=\"p\" size=\"6\" mb=\"5\">\n Sleeps two\n </SubTitle>\n </Card.Content>\n </Card>\n </CarouselItem>\n ))}\n</Carousel>"
|
|
38
|
+
"code": "<Carousel ariaLabel=\"Featured rooms\" indicatorInside overlayControls={false}>\n {['Garden Room', 'Harbor Suite', 'Loft', 'Courtyard Twin'].map(room => (\n <CarouselItem key={room}>\n <Card m=\"2\">\n <Card.Content px=\"6\" py=\"6\" textAlign=\"centered\">\n <Title as=\"p\" size=\"5\" mt=\"5\">\n {room}\n </Title>\n <SubTitle as=\"p\" size=\"6\" mb=\"5\">\n Sleeps two\n </SubTitle>\n </Card.Content>\n </Card>\n </CarouselItem>\n ))}\n</Carousel>"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"title": "Overlay Arrows",
|
|
42
|
-
"code": "<Carousel overlayControls>\n <CarouselItem>\n <Hero color=\"dark\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 1</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"link\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 2</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
42
|
+
"code": "<Carousel ariaLabel=\"Overlay arrows\" overlayControls>\n <CarouselItem>\n <Hero color=\"dark\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 1</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"link\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 2</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"title": "Without Arrows",
|
|
46
|
-
"code": "<Carousel arrow={false}>\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Swipe or Click Dots</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"link\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Navigation Only</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
46
|
+
"code": "<Carousel ariaLabel=\"Navigation without arrows\" arrow={false}>\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Swipe or Click Dots</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"link\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Navigation Only</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"title": "Arrows on Hover",
|
|
50
|
-
"code": "<Carousel arrowHover>\n <CarouselItem>\n <Hero color=\"dark\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Hover to see arrows</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 2</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 3</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
50
|
+
"code": "<Carousel ariaLabel=\"Arrows on hover\" arrowHover>\n <CarouselItem>\n <Hero color=\"dark\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Hover to see arrows</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 2</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 3</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"title": "Transparent Arrow Buttons",
|
|
54
|
-
"code": "<Carousel arrowBackground={false}>\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 1</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 2</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"danger\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 3</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
54
|
+
"code": "<Carousel ariaLabel=\"Transparent arrows\" arrowBackground={false}>\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 1</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 2</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"danger\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 3</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
"title": "Custom Arrow Icons",
|
|
58
|
-
"code": "<Carousel\n iconPrev=\"chevron-left\"\n iconNext=\"chevron-right\"\n iconLibrary=\"fa\"\n iconVariant=\"solid\"\n>\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 1</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 2</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"danger\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 3</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
58
|
+
"code": "<Carousel\n ariaLabel=\"Font Awesome arrows\"\n iconPrev=\"chevron-left\"\n iconNext=\"chevron-right\"\n iconLibrary=\"fa\"\n iconVariant=\"solid\"\n>\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 1</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 2</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"danger\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 3</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"title": "With Material Design Icons",
|
|
62
|
-
"code": "<Carousel iconPrev=\"arrow-left\"
|
|
62
|
+
"code": "<Carousel\n ariaLabel=\"Material Design arrows\"\n iconPrev=\"arrow-left\"\n iconNext=\"arrow-right\"\n iconLibrary=\"mdi\"\n>\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 1</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 2</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"title": "Controlled Carousel",
|
|
66
|
-
"code": "function ControlledExample() {\n const [currentSlide, setCurrentSlide] = useState(0);\n return (\n <Block>\n <Buttons mb=\"4\">\n <Button\n onClick={() => setCurrentSlide(0)}\n color={currentSlide === 0 ? 'primary' : undefined}\n >\n 1\n </Button>\n <Button\n onClick={() => setCurrentSlide(1)}\n color={currentSlide === 1 ? 'primary' : undefined}\n >\n 2\n </Button>\n <Button\n onClick={() => setCurrentSlide(2)}\n color={currentSlide === 2 ? 'primary' : undefined}\n >\n 3\n </Button>\n </Buttons>\n <Carousel\n value={currentSlide}\n onChange={setCurrentSlide}\n indicator={false}\n >\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 1</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 2</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"danger\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 3</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n </Carousel>\n <Paragraph mt=\"2\">Current slide: {currentSlide + 1}</Paragraph>\n </Block>\n );\n}"
|
|
66
|
+
"code": "function ControlledExample() {\n const [currentSlide, setCurrentSlide] = useState(0);\n return (\n <Block>\n <Buttons mb=\"4\">\n <Button\n onClick={() => setCurrentSlide(0)}\n color={currentSlide === 0 ? 'primary' : undefined}\n >\n 1\n </Button>\n <Button\n onClick={() => setCurrentSlide(1)}\n color={currentSlide === 1 ? 'primary' : undefined}\n >\n 2\n </Button>\n <Button\n onClick={() => setCurrentSlide(2)}\n color={currentSlide === 2 ? 'primary' : undefined}\n >\n 3\n </Button>\n </Buttons>\n <Carousel\n ariaLabel=\"Controlled slides\"\n value={currentSlide}\n onChange={setCurrentSlide}\n indicator={false}\n >\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 1</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 2</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"danger\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 3</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n </Carousel>\n <Paragraph mt=\"2\">Current slide: {currentSlide + 1}</Paragraph>\n </Block>\n );\n}"
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
"title": "Non-repeating Carousel",
|
|
70
|
-
"code": "<Carousel repeat={false}>\n <CarouselItem>\n <Hero color=\"danger\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">First (no previous)</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"warning\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph>Middle slide</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Last (no next)</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
70
|
+
"code": "<Carousel ariaLabel=\"Slides without repeat\" repeat={false}>\n <CarouselItem>\n <Hero color=\"danger\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">First (no previous)</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"warning\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph>Middle slide</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Last (no next)</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
71
71
|
}
|
|
72
72
|
],
|
|
73
|
-
"accessibility": "- Uses `role=\"region\"` with `aria-roledescription=\"carousel\"`\n- Each item is a `group` with `aria-roledescription=\"slide\"`, named for its place, such as \"2 of 6\". An item's own `aria-label` or `aria-labelledby` takes the place of that name\n- Items out of view are `aria-hidden` and `inert`, so screen readers skip them and nothing in them takes focus. With several in view, every item in view is exposed. The copies a loop adds at each end of the track follow the same rule, so where the view runs past the last item, the copies on screen are the ones exposed\n- The track is a polite live region, so what comes into view is announced, except while autoplay is moving it (`aria-live=\"off\"`)\n- Autoplay waits while the pointer is over the carousel (with `pauseOnHover`) and while focus is anywhere inside it, on an item, an arrow or an indicator, so nothing moves while someone reads or works it. A browser that leaves focus on an arrow or an indicator a click pressed keeps it waiting until focus moves on. It's a pause, not a stop: once the pointer and focus leave, autoplay goes on\n- When something else takes the item holding focus out of view (a swipe, a change of width that changes the count, a new controlled `value`, or the item's removal), focus moves to the first item in view rather than dropping to the page\n- Navigation arrows have `aria-label` for screen readers\n- With `arrowBackground={false}`, an arrow with keyboard focus shows Bulma's focus outline, as a ghost `Button` does, in the overlay look too. With `arrowHover`, an arrow shows while keyboard focus is on it\n- Indicators use `role=\"tablist\"` and `role=\"tab\"` semantics, one for each position a step can land on\n- The indicators take Bulma's look: a resting dot, line or bar is filled in the border color and the current one in the primary color, and a circle is a ring in the border color, filled when current. A resting one falls short of the 3:1 against the page that WCAG asks of a graphic. For that, set `--bulma-carousel-indicator-border-color` to a color such as `var(--bulma-text-weak)` on a class you pass through `className`, with the carousel's class in the selector (`.carousel.my-carousel`, `.bestax-carousel.my-carousel` under the prefixed flavor) so it wins whatever order the stylesheets load in. It draws a ring at each resting indicator's edge, circles included, and leaves the current one, and the dots, lines and bars in the overlay look, as they are. Forced colors (Windows' contrast themes) replaces the fills, so there each indicator shows its ring in the buttons' text color and the current one is filled in it.\n- The Left and Right arrow keys move the carousel while focus is on its arrows or indicators. Inside an item they're left to the item's content, such as a field or a slider\n- Previous/Next buttons are disabled at the ends when not repeating. When the one holding focus is disabled, focus moves to the current indicator, or to the other arrow when there are no indicators. When a focused arrow or indicator goes away, as an indicator does when a change of width leaves fewer positions, focus moves to the current indicator, an arrow that works, or the first item in view, rather than dropping to the page\n- On a right-to-left page the slides run from right to left. The previous arrow sits on the right, at the start of the line, and the next arrow on the left, and the built-in chevrons flip to match. An `iconPrev` or `iconNext` is drawn as you give it. <kbd>ArrowLeft</kbd> and a swipe to the right go to the next slide, the way the track moves.",
|
|
73
|
+
"accessibility": "- Uses `role=\"region\"` with `aria-roledescription=\"carousel\"`\n- Name each carousel for what it shows with `ariaLabel`, such as \"Featured products\", and leave the word \"carousel\" out of it, since the role description already says it. Under a visible heading, pass `aria-labelledby` with the heading's id instead, which names it ahead of the `aria-label` the default still sets. The default, \"Image carousel\", is a placeholder: with the role description it says \"carousel\" twice, and every carousel left with it has the same name\n- Each item is a `group` with `aria-roledescription=\"slide\"`, named for its place, such as \"2 of 6\". An item's own `aria-label` or `aria-labelledby` takes the place of that name\n- Items out of view are `aria-hidden` and `inert`, so screen readers skip them and nothing in them takes focus. With several in view, every item in view is exposed. The copies a loop adds at each end of the track follow the same rule, so where the view runs past the last item, the copies on screen are the ones exposed\n- The track is a polite live region, so what comes into view is announced, except while autoplay is moving it (`aria-live=\"off\"`)\n- Autoplay waits while the pointer is over the carousel (with `pauseOnHover`) and while focus is anywhere inside it, on an item, an arrow or an indicator, so nothing moves while someone reads or works it. A browser that leaves focus on an arrow or an indicator a click pressed keeps it waiting until focus moves on. It's a pause, not a stop: once the pointer and focus leave, autoplay goes on\n- When something else takes the item holding focus out of view (a swipe, a change of width that changes the count, a new controlled `value`, or the item's removal), focus moves to the first item in view rather than dropping to the page\n- Navigation arrows have `aria-label` for screen readers\n- With `arrowBackground={false}`, an arrow with keyboard focus shows Bulma's focus outline, as a ghost `Button` does, in the overlay look too. With `arrowHover`, an arrow shows while keyboard focus is on it\n- Indicators use `role=\"tablist\"` and `role=\"tab\"` semantics, one for each position a step can land on\n- The indicators take Bulma's look: a resting dot, line or bar is filled in the border color and the current one in the primary color, and a circle is a ring in the border color, filled when current. A resting one falls short of the 3:1 against the page that WCAG asks of a graphic. For that, set `--bulma-carousel-indicator-border-color` to a color such as `var(--bulma-text-weak)` on a class you pass through `className`, with the carousel's class in the selector (`.carousel.my-carousel`, `.bestax-carousel.my-carousel` under the prefixed flavor) so it wins whatever order the stylesheets load in. It draws a ring at each resting indicator's edge, circles included, and leaves the current one, and the dots, lines and bars in the overlay look, as they are. Forced colors (Windows' contrast themes) replaces the fills, so there each indicator shows its ring in the buttons' text color and the current one is filled in it.\n- The Left and Right arrow keys move the carousel while focus is on its arrows or indicators, unless Alt, Ctrl or Meta is held, which leaves them to the browser. Inside an item they're left to the item's content, such as a field or a slider. On an indicator they move focus to the indicator beside it and bring its slide into view, as a click on it does\n- Previous/Next buttons are disabled at the ends when not repeating. When the one holding focus is disabled, focus moves to the current indicator, or to the other arrow when there are no indicators. When a focused arrow or indicator goes away, as an indicator does when a change of width leaves fewer positions, focus moves to the current indicator, an arrow that works, or the first item in view, rather than dropping to the page\n- On a right-to-left page the slides run from right to left. The previous arrow sits on the right, at the start of the line, and the next arrow on the left, and the built-in chevrons flip to match. An `iconPrev` or `iconNext` is drawn as you give it. <kbd>ArrowLeft</kbd> and a swipe to the right go to the next slide, the way the track moves.",
|
|
74
74
|
"related": ["Modal", "Tabs"],
|
|
75
75
|
"storybook": "https://bestax.io/storybook/?path=/story/components-carousel",
|
|
76
76
|
"summary": "The `Carousel` component provides an image/content slider with navigation arrows and indicators.",
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
"name": "itemsToScroll",
|
|
196
196
|
"type": "number",
|
|
197
197
|
"default": "1",
|
|
198
|
-
"description": "How many items one step moves, for an arrow, an arrow key, a swipe or an autoplay tick. A whole number, capped at the count in view so a step never skips an item. Without `repeat`, the last step stops at the last full view, so it can be shorter; with `repeat`, the step after the last position goes on to the first one. The indicators mark these positions, one per step rather than one per item. When the count in view changes with the window's width, the first item in view stays in view.",
|
|
198
|
+
"description": "How many items one step moves, for an arrow, an arrow key on an arrow, a swipe or an autoplay tick. A whole number, capped at the count in view so a step never skips an item. Without `repeat`, the last step stops at the last full view, so it can be shorter; with `repeat`, the step after the last position goes on to the first one. The indicators mark these positions, one per step rather than one per item. When the count in view changes with the window's width, the first item in view stays in view.",
|
|
199
199
|
"required": false,
|
|
200
200
|
"inherited": false,
|
|
201
201
|
"deprecated": false
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
"name": "indicator",
|
|
223
223
|
"type": "boolean",
|
|
224
224
|
"default": "true",
|
|
225
|
-
"description": "Show slide indicators. Default: true. There is one for each position a step can land on (see `itemsToScroll`). They render `type=\"button\"`, so a carousel inside a form is not submitted by picking a slide.",
|
|
225
|
+
"description": "Show slide indicators. Default: true. There is one for each position a step can land on (see `itemsToScroll`). They render `type=\"button\"`, so a carousel inside a form is not submitted by picking a slide. Left and Right on an indicator move focus to the indicator beside it and bring its slide into view, as a click on it does, mirrored on a right-to-left page.",
|
|
226
226
|
"required": false,
|
|
227
227
|
"inherited": false,
|
|
228
228
|
"deprecated": false
|
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
"name": "ariaLabel",
|
|
340
340
|
"type": "string",
|
|
341
341
|
"default": "'Image carousel'",
|
|
342
|
-
"description": "
|
|
342
|
+
"description": "The carousel region's name. Name it for what it shows, such as \"Featured products\", and leave out the word \"carousel\", which the region's role description already says. Under a visible heading, `aria-labelledby` with the heading's id names it instead, ahead of the `aria-label` the default still sets. The default is a placeholder that says \"carousel\" twice with the role description, and is the same on every carousel left with it. Default: 'Image carousel'.",
|
|
343
343
|
"required": false,
|
|
344
344
|
"inherited": false,
|
|
345
345
|
"deprecated": false
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"code": "<LocaleProvider locale=\"ar\" dir=\"rtl\">\n <Cascader\n label=\"المدينة\"\n defaultValue=\"berlin\"\n clearable\n data={[\n {\n value: 'germany',\n label: 'ألمانيا',\n children: [{ value: 'berlin', label: 'برلين' }],\n },\n { value: 'oceania', label: 'أوقيانوسيا' },\n ]}\n />\n</LocaleProvider>"
|
|
43
43
|
}
|
|
44
44
|
],
|
|
45
|
-
"accessibility": "- **The field is a combobox that opens a dialog,** as the date pickers' and TreeSelect's are:\n `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded`, and `aria-controls` while the\n panel is open, named by its `label`. It's read-only, and its value is the picked node's path.\n- **Keys on the field:** a click, Enter, Space, Down or Alt+Down opens the panel, and with\n `searchable` a printable key opens it with that key in the search box.\n- **The panel** is a non-modal `dialog`, named by the label or `labels.choose`. Focus moves into\n it as it opens: onto the picked node, its path open, or with nothing picked onto the first\n column's item on an open path, or its first enabled item, so a `defaultExpanded` path stays\n open. It holds\n focus while it's open, as the date pickers' panel does: Tab and Shift+Tab move between the\n search box and the columns, and wrap. Escape and Alt+Up close it and put focus back on the\n field, and so does a pick. A press outside closes it and leaves focus where the press put it.\n- **Each column** is a `listbox` with one tab stop and real focus on its `option`s. The first is\n named as the panel is, and each one after it by the label of the item that opened it. Up, Down,\n Home, End and type-ahead move within a column, and type-ahead starts over in each column it\n comes into and after Up, Down, Home or End. Space joins a search under way when an item starts with what's been typed and a\n space, so \"new y\" reaches \"New York\", and otherwise picks or opens. Right opens the next column\n and moves into it, Left goes back, and the two swap on a right-to-left page. Disabled items are\n reachable and `aria-disabled`, and Right moves into a column at its item on the open path even\n when that one is disabled.\n- **The picked node's path is `aria-selected`,** and drawn filled, its items `is-checked` as\n Combobox's picked items are. The path you've opened, which follows focus, is drawn with a lighter\n tint, its items `is-active` as Combobox's highlighted item is, and isn't announced as selected, so moving around never says an item is picked when it isn't. A disabled\n node on the picked path is selected but not filled, so it stays readable. In forced colors the\n picked path takes the system's highlight and the open path an outline. Right opens the focused\n item and nothing else.\n- **An item that opens a column** is described by \"Opens a column\", or `labels.opens`, since an\n option has no way of its own to say it has items under it. Its chevron is hidden.\n- **A column that's loading** ends in a row that says so, and a failed load's row is named by its\n message and its Retry, which Enter, Space or a click run. The live region says when a column\n starts loading and when it's loaded, as TreeView's does.\n- **The search box** is named \"Search\", or `labels.search`, and its results are a listbox of the\n paths that match. Enter picks the highlighted path unless it's disabled, and with none\n highlighted it does nothing, so it never submits the form around the field. When nothing matches, `empty` is said once\n through a polite status region, not again on every key.\n- **`required`** makes the field `aria-required`. A read-only field is left out of the browser's\n own check, so a hidden field over it carries `required`. When the browser stops a submit, it\n focuses that one and shows its message, which every browser takes down as it loses focus. So\n focus stays there, reading as the field and drawn on it, with no on-screen keyboard. A press\n goes where it lands, and the next key, other than a modifier on its own, goes to the field and\n does what it would there.\n- **Forced colors:** the field, the panel and the columns keep their edges in system colors, the\n path through the columns keeps the system's highlight, and the chevrons are borders, so they\n stay.\n- A panel that would run past the left or right edge of the screen, as on a phone with the\n field mid-row, keeps its corner and moves sideways just far enough to fit, or, wider than\n the screen, to the edge its text starts from.\n- The `message` describes the field through `aria-describedby`, after any ids you pass there, so a screen reader reads it when the field takes focus.",
|
|
45
|
+
"accessibility": "- **The field is a combobox that opens a dialog,** as the date pickers' and TreeSelect's are:\n `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded`, and `aria-controls` while the\n panel is open, named by its `label`. It's read-only, and its value is the picked node's path.\n- **Keys on the field:** a click, Enter, Space, Down or Alt+Down opens the panel, and with\n `searchable` a printable key opens it with that key in the search box.\n- **The panel** is a non-modal `dialog`, named by the label or `labels.choose`. Focus moves into\n it as it opens: onto the picked node, its path open, or with nothing picked onto the first\n column's item on an open path, or its first enabled item, so a `defaultExpanded` path stays\n open. It holds\n focus while it's open, as the date pickers' panel does: Tab and Shift+Tab move between the\n search box and the columns, and wrap. Escape and Alt+Up close it and put focus back on the\n field, and so does a pick. A press outside closes it and leaves focus where the press put it.\n- **Each column** is a `listbox` with one tab stop and real focus on its `option`s. The first is\n named as the panel is, and each one after it by the label of the item that opened it. Up, Down,\n Home, End and type-ahead move within a column, and type-ahead starts over in each column it\n comes into and after Up, Down, Home or End. Space joins a search under way when an item starts with what's been typed and a\n space, so \"new y\" reaches \"New York\", and otherwise picks or opens. Right opens the next column\n and moves into it, Left goes back, and the two swap on a right-to-left page. Disabled items are\n reachable and `aria-disabled`, and Right moves into a column at its item on the open path even\n when that one is disabled.\n- **The picked node's path is `aria-selected`,** and drawn filled, its items `is-checked` as\n Combobox's picked items are. The path you've opened, which follows focus, is drawn with a lighter\n tint, its items `is-active` as Combobox's highlighted item is, and isn't announced as selected, so moving around never says an item is picked when it isn't. A disabled\n node on the picked path is selected but not filled, so it stays readable. In forced colors the\n picked path takes the system's highlight and the open path an outline. Right opens the focused\n item and nothing else.\n- **An item that opens a column** is described by \"Opens a column\", or `labels.opens`, since an\n option has no way of its own to say it has items under it. Its chevron is hidden.\n- **A column that's loading** ends in a row that says so, and a failed load's row is named by its\n message and its Retry, which Enter, Space or a click run. The live region says when a column\n starts loading and when it's loaded, as TreeView's does.\n- **The search box** is named \"Search\", or `labels.search`, and its results are a listbox of the\n paths that match. Enter picks the highlighted path unless it's disabled, and with none\n highlighted it does nothing, so it never submits the form around the field. When nothing matches, `empty` is said once\n through a polite status region, not again on every key.\n- **`required`** makes the field `aria-required`. A read-only field is left out of the browser's\n own check, so a hidden field over it carries `required`. When the browser stops a submit, it\n focuses that one and shows its message, which every browser takes down as it loses focus. So\n focus stays there, reading as the field and drawn on it, with no on-screen keyboard. A press\n goes where it lands, and the next key, other than a modifier on its own, goes to the field and\n does what it would there.\n- **Forced colors:** the field, the panel and the columns keep their edges in system colors, the\n path through the columns keeps the system's highlight, and the chevrons are borders, so they\n stay.\n- A panel that would run past the left or right edge of the screen, as on a phone with the\n field mid-row, keeps its corner and moves sideways just far enough to fit, or, wider than\n the screen, to the edge its text starts from.\n- The `message` describes the field through `aria-describedby`, after any ids you pass there, so a screen reader reads it when the field takes focus.\n- `aria-invalid` and `aria-errormessage` go on the field, while the other attributes you pass go on the wrapper, so a screen reader hears the field is invalid when it takes focus.",
|
|
46
46
|
"related": [
|
|
47
47
|
"Combobox",
|
|
48
48
|
"Select",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"code": "function example() {\n const drinks: Record<\n string,\n { value: string; label: string; disabled?: boolean }[]\n > = {\n Hot: [\n { value: 'coffee', label: 'Coffee' },\n { value: 'tea', label: 'Tea' },\n ],\n Cold: [\n { value: 'lemonade', label: 'Lemonade' },\n { value: 'iced-tea', label: 'Iced tea' },\n { value: 'smoothie', label: 'Smoothie (sold out)', disabled: true },\n ],\n };\n const [query, setQuery] = useState('');\n const [value, setValue] = useState('tea');\n const picked = Object.values(drinks)\n .flat()\n .find(i => i.value === value);\n const term = query.trim().toLowerCase();\n const groups = Object.entries(drinks)\n .map(([label, items]) => ({\n label,\n items: items.filter(i => i.label.toLowerCase().includes(term)),\n }))\n .filter(g => g.items.length > 0);\n\n return (\n <form onSubmit={e => e.preventDefault()}>\n <Combobox\n label=\"Drink\"\n message={`Your drink: ${picked?.label}`}\n onSelect={next => {\n setValue(next);\n setQuery('');\n }}\n >\n <Combobox.Input\n iconLeftName=\"mug-hot\"\n placeholder=\"Type to filter\"\n value={query}\n onChange={e => setQuery(e.target.value)}\n />\n <Combobox.Menu>\n {groups.length > 0 ? (\n <Combobox.List>\n {groups.map(g => (\n <Combobox.Group key={g.label} label={g.label}>\n {g.items.map(i => (\n <Combobox.Item\n key={i.value}\n value={i.value}\n checked={i.value === value}\n disabled={i.disabled}\n >\n {i.label}\n </Combobox.Item>\n ))}\n </Combobox.Group>\n ))}\n </Combobox.List>\n ) : (\n <Combobox.Empty>No drinks match</Combobox.Empty>\n )}\n </Combobox.Menu>\n </Combobox>\n <Select label=\"Size\">\n <option>Small</option>\n <option>Medium</option>\n <option>Large</option>\n </Select>\n <Input label=\"Name for the cup\" />\n <Button type=\"submit\" color=\"primary\">\n Order\n </Button>\n </form>\n );\n}"
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
|
-
"accessibility": "- **The roles:** the field is `role=\"combobox\"` with `aria-autocomplete=\"list\"` and\n `aria-haspopup=\"listbox\"`. The list is a `listbox` of `option`s, and a group is a `group` named by\n its heading. This is the ARIA 1.2 combobox the ARIA Authoring Practices describe.\n- **Focus stays in the field:** the highlighted item is the field's `aria-activedescendant`.\n When a key or the list opening moves the highlight, the item is scrolled into view, since a\n browser only scrolls to what has focus. The pointer moves it without scrolling, since the pointer\n is already on that item. A click on an item keeps focus in the field too.\n- **`aria-expanded`** is `true` while a list with an item in it is on screen, and\n `aria-controls` points at the list then. While the menu shows just the empty message, the\n field says it's collapsed, and so does the server markup for a list rendered with\n `appendToBody`, which shows only once the page has hydrated.\n- **The list's name** comes from the label that names the field: the Combobox's `label`, or an\n outer `Field`'s. An `aria-label` or `aria-labelledby` you put on `Combobox.List` wins, and\n with none of these the list is named \"Suggestions\". Given `data`, an `aria-label` or\n `aria-labelledby` on the Combobox names the field and the list, so it needs no `label`.\n- **`aria-selected`, with one value,** is on the highlighted item and nothing else, the way the\n Authoring Practices' combobox examples do it. The value shows as a check mark, which doesn't rely\n on color, and the list opens with the highlight on it. Several libraries put `aria-selected` on\n the chosen item instead.\n- **With `multiple`,** the list is `aria-multiselectable`, and each item's `aria-selected` is its\n `checked`.\n- **Disabled items** are `aria-disabled` and stay reachable with the arrows, the Authoring\n Practices' advice for listbox options, so a screen reader user finds them. They're never picked\n or `aria-selected`, and the opening highlight and `keepFirst` pass over them.\n- **The empty message** sits beside the list, not in it, so it isn't counted as an item. When\n your typing brings it on screen, its text is announced through a polite status region that's in\n the page from the start, once each time the matches run out. Opening the list with it already\n there, or emptying the field, announces nothing. While `isLoading` is on, or a loading `Control`\n is around the Combobox, the announcement waits and is made once loading ends. In a menu,\n keep it to text: Tab closes the list before a keyboard user can reach a link or a button in it.\n An `inline` list stays on screen, so a link or a button beside it is in the Tab order.\n- **Tags,** with `multiple` and `data`: the field's `aria-describedby` points at the tags' labels,\n since its own text is the search, so focusing it reads the picks. Each tag's button is named\n \"Remove\" and the item's label, or `ariaCloseLabel` with the label as its description, and\n taking a tag off puts focus back in the field, which then reads the picks that are left.\n- **No counts are announced,** for the reasons in [A Result Count](https://bestax.io/docs/api/form/combobox#a-result-count).\n- **Enter and Escape:** Enter submits the form when nothing is highlighted, and Escape only stops\n at the Combobox when it closed a panel that was on screen.\n- **Forced colors:** in Windows high contrast mode the highlight is drawn as an outline in the\n system's highlight color, a disabled item takes the system's color for disabled text, and the\n check mark and the panel's edge stay visible.\n- A menu that would run past the left or right edge of the screen, as on a phone with the\n field mid-row, keeps its corner and moves sideways just far enough to fit, or, wider than\n the screen, to the edge its text starts from.\n- The `message` describes the field through `aria-describedby`, after any ids you pass to `Combobox.Input` and, with `data` and `multiple`, after the picked tags.",
|
|
65
|
+
"accessibility": "- **The roles:** the field is `role=\"combobox\"` with `aria-autocomplete=\"list\"` and\n `aria-haspopup=\"listbox\"`. The list is a `listbox` of `option`s, and a group is a `group` named by\n its heading. This is the ARIA 1.2 combobox the ARIA Authoring Practices describe.\n- **Focus stays in the field:** the highlighted item is the field's `aria-activedescendant`.\n When a key or the list opening moves the highlight, the item is scrolled into view, since a\n browser only scrolls to what has focus. The pointer moves it without scrolling, since the pointer\n is already on that item. A click on an item keeps focus in the field too.\n- **`aria-expanded`** is `true` while a list with an item in it is on screen, and\n `aria-controls` points at the list then. While the menu shows just the empty message, the\n field says it's collapsed, and so does the server markup for a list rendered with\n `appendToBody`, which shows only once the page has hydrated.\n- **The list's name** comes from the label that names the field: the Combobox's `label`, or an\n outer `Field`'s. An `aria-label` or `aria-labelledby` you put on `Combobox.List` wins, and\n with none of these the list is named \"Suggestions\". Given `data`, an `aria-label` or\n `aria-labelledby` on the Combobox names the field and the list, so it needs no `label`.\n- **`aria-selected`, with one value,** is on the highlighted item and nothing else, the way the\n Authoring Practices' combobox examples do it. The value shows as a check mark, which doesn't rely\n on color, and the list opens with the highlight on it. Several libraries put `aria-selected` on\n the chosen item instead.\n- **With `multiple`,** the list is `aria-multiselectable`, and each item's `aria-selected` is its\n `checked`.\n- **Disabled items** are `aria-disabled` and stay reachable with the arrows, the Authoring\n Practices' advice for listbox options, so a screen reader user finds them. They're never picked\n or `aria-selected`, and the opening highlight and `keepFirst` pass over them.\n- **The empty message** sits beside the list, not in it, so it isn't counted as an item. When\n your typing brings it on screen, its text is announced through a polite status region that's in\n the page from the start, once each time the matches run out. Opening the list with it already\n there, or emptying the field, announces nothing. While `isLoading` is on, or a loading `Control`\n is around the Combobox, the announcement waits and is made once loading ends. In a menu,\n keep it to text: Tab closes the list before a keyboard user can reach a link or a button in it.\n An `inline` list stays on screen, so a link or a button beside it is in the Tab order.\n- **Tags,** with `multiple` and `data`: the field's `aria-describedby` points at the tags' labels,\n since its own text is the search, so focusing it reads the picks. Each tag's button is named\n \"Remove\" and the item's label, or `ariaCloseLabel` with the label as its description, and\n taking a tag off puts focus back in the field, which then reads the picks that are left.\n- **No counts are announced,** for the reasons in [A Result Count](https://bestax.io/docs/api/form/combobox#a-result-count).\n- **Enter and Escape:** Enter submits the form when nothing is highlighted, and Escape only stops\n at the Combobox when it closed a panel that was on screen.\n- **Forced colors:** in Windows high contrast mode the highlight is drawn as an outline in the\n system's highlight color, a disabled item takes the system's color for disabled text, and the\n check mark and the panel's edge stay visible.\n- A menu that would run past the left or right edge of the screen, as on a phone with the\n field mid-row, keeps its corner and moves sideways just far enough to fit, or, wider than\n the screen, to the edge its text starts from.\n- The `message` describes the field through `aria-describedby`, after any ids you pass to `Combobox.Input` and, with `data` and `multiple`, after the picked tags.\n- With `data`, `aria-invalid` and `aria-errormessage` go on the field, while the Combobox's other attributes go on the wrapper, so a screen reader hears the field is invalid when it takes focus. Built from parts, pass them to `Combobox.Input`.",
|
|
66
66
|
"related": [
|
|
67
67
|
"Autocomplete",
|
|
68
68
|
"Cascader",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"code": "<ContextMenu\n aria-label=\"Actions for notes.txt\"\n trigger={\n <Box tabIndex={0} p=\"6\" textAlign=\"centered\">\n notes.txt\n </Box>\n }\n>\n <ContextMenu.Item as=\"button\">Open</ContextMenu.Item>\n <ContextMenu.Item as=\"button\">Rename</ContextMenu.Item>\n <ContextMenu.Divider />\n <ContextMenu.Item as=\"button\">Delete</ContextMenu.Item>\n</ContextMenu>"
|
|
39
39
|
}
|
|
40
40
|
],
|
|
41
|
-
"accessibility": "`ContextMenu` follows the [WAI-ARIA menu pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/),\nwithout a menubar or submenus:\n\n- **Opening:** APG names \"a command, such as Shift + F10 in Windows, that opens a context specific\n menu\". That's the browser's `contextmenu` event, which <kbd>Shift</kbd>+<kbd>F10</kbd> and the\n context menu key fire on Windows and Linux, and VoiceOver's <kbd>VO</kbd>+<kbd>Shift</kbd>+<kbd>M</kbd>\n fires on macOS. `ContextMenu` adds no key handler of its own, so the menu never opens twice for\n one key.\n- **Focus on open** goes to the first enabled item, or to the menu itself when there's none.\n- <kbd>ArrowDown</kbd> and <kbd>ArrowUp</kbd> move to the next and previous item, wrapping, and\n <kbd>Home</kbd> and <kbd>End</kbd> go to the first and last.\n- **Typing** a letter moves to the next item whose text starts with what's been typed. Letters typed\n in quick succession add up to one search, and the same letter again cycles through the items that\n start with it. Each opening starts a new search.\n- <kbd>Enter</kbd> and <kbd>Space</kbd> activate the focused item the way a click does, so its\n `onClick` runs, and a key held down activates it once.\n- <kbd>Escape</kbd> closes the menu and returns focus to what had it before the menu opened. It\n stops there, so a `Popover` or a `Modal` around the menu stays open.\n- <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> close it and return focus too. The menu sits at\n the end of the page, so letting Tab go on from it would skip the rest of the page.\n- An item that runs closes the menu and returns focus, unless it moved focus somewhere else, such as\n into a `Modal` it opened or a rename field.\n\nRoles and names:\n\n- The menu is `role=\"menu\"`, named by the `aria-label` or `aria-labelledby` you pass. There's no\n button to borrow a name from, and a development build warns when a menu opens without one.\n- Items are `menuitem` by default, and `menuitemcheckbox` or `menuitemradio` with `aria-checked`\n through the item's `role`. A divider is an `<hr>`, which is a separator.\n- An `active` item has `aria-current=\"true\"`, as in `Dropdown`, and an `aria-current` you pass\n wins.\n- Disabled items, a `button` with `disabled` or an item with `aria-disabled=\"true\"`, are skipped by\n the arrow keys and by typing, as in `Dropdown`, and they go on from an item that turns disabled\n while it keeps focus.\n- The trigger gets no ARIA, no role and no tab stop. `aria-haspopup` describes a popup that opens\n when an element is activated, and a right-click on a row isn't that. So nothing tells a screen\n reader user the menu is there, and on macOS only VoiceOver opens it from the keyboard: every action\n in it has to be reachable from a visible control as well, which\n [WCAG 2.1.1](https://www.w3.org/WAI/WCAG22/Understanding/keyboard.html) asks for.\n\nAnd around it:\n\n- The menu isn't modal. A press outside it closes it and does whatever it does, the rest of the page\n stays reachable, and nothing locks scrolling.\n- Nothing listens on the page while the menu is closed and no finger is held on its trigger, so a\n table with a menu on every row adds no listeners until one is used.\n- The menu doesn't animate.",
|
|
41
|
+
"accessibility": "`ContextMenu` follows the [WAI-ARIA menu pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/),\nwithout a menubar or submenus:\n\n- **Opening:** APG names \"a command, such as Shift + F10 in Windows, that opens a context specific\n menu\". That's the browser's `contextmenu` event, which <kbd>Shift</kbd>+<kbd>F10</kbd> and the\n context menu key fire on Windows and Linux, and VoiceOver's <kbd>VO</kbd>+<kbd>Shift</kbd>+<kbd>M</kbd>\n fires on macOS. `ContextMenu` adds no key handler of its own, so the menu never opens twice for\n one key.\n- **Focus on open** goes to the first enabled item, or to the menu itself when there's none.\n- <kbd>ArrowDown</kbd> and <kbd>ArrowUp</kbd> move to the next and previous item, wrapping, and\n <kbd>Home</kbd> and <kbd>End</kbd> go to the first and last.\n- **Typing** a letter moves to the next item whose text starts with what's been typed. Letters typed\n in quick succession add up to one search, and the same letter again cycles through the items that\n start with it. Each opening starts a new search.\n- <kbd>Enter</kbd> and <kbd>Space</kbd> activate the focused item the way a click does, so its\n `onClick` runs, and a key held down activates it once.\n- <kbd>Escape</kbd> closes the menu and returns focus to what had it before the menu opened. It\n stops there, so a `Popover` or a `Modal` around the menu stays open.\n- <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> close it and return focus too. The menu sits at\n the end of the page, so letting Tab go on from it would skip the rest of the page.\n- An item that runs closes the menu and returns focus, unless it moved focus somewhere else, such as\n into a `Modal` it opened or a rename field.\n\nRoles and names:\n\n- The menu is `role=\"menu\"`, named by the `aria-label` or `aria-labelledby` you pass. There's no\n button to borrow a name from, and a development build warns when a menu opens without one.\n- Items are `menuitem` by default, and `menuitemcheckbox` or `menuitemradio` with `aria-checked`\n through the item's `role`. A divider is an `<hr>`, which is a separator.\n- An `active` item has `aria-current=\"true\"`, as in `Dropdown`, and an `aria-current` you pass\n wins.\n- Disabled items, a `button` with `disabled` or an item with `aria-disabled=\"true\"`, are skipped by\n the arrow keys and by typing, as in `Dropdown`, and they go on from an item that turns disabled\n while it keeps focus.\n- The trigger gets no ARIA, no role and no tab stop. `aria-haspopup` describes a popup that opens\n when an element is activated, and a right-click on a row isn't that. So nothing tells a screen\n reader user the menu is there, and on macOS only VoiceOver opens it from the keyboard: every action\n in it has to be reachable from a visible control as well, which\n [WCAG 2.1.1](https://www.w3.org/WAI/WCAG22/Understanding/keyboard.html) asks for.\n\nAnd around it:\n\n- The menu isn't modal. A press outside it closes it and does whatever it does, the rest of the page\n stays reachable, and nothing locks scrolling.\n- Nothing listens on the page while the menu is closed and no finger is held on its trigger, so a\n table with a menu on every row adds no listeners until one is used.\n- The menu doesn't animate.\n- In forced colors (Windows' contrast themes), a divider is drawn in the system's text color, as in\n `Dropdown`. That rule ships in `bestax.css` and `extras.css`, from the dropdown partial, so a\n modular build adds `scss/components/dropdown` for it.",
|
|
42
42
|
"related": [
|
|
43
43
|
"ConfigProvider",
|
|
44
44
|
"Dropdown",
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"name": "isStatic",
|
|
176
176
|
"type": "boolean",
|
|
177
177
|
"default": "false",
|
|
178
|
-
"description": "
|
|
178
|
+
"description": "Draws Bulma's static look and stops the pointer. It doesn't change the element: a `<button>` with it is still a tab stop that a screen reader announces as a button and Enter and Space press, and in a form it's a submit button. A label that does nothing, such as \"@gmail.com\" beside an input in a `Field` with addons, is a `Button` rendered `as=\"span\"`, which Tab skips and a screen reader reads as text.",
|
|
179
179
|
"required": false,
|
|
180
180
|
"inherited": true,
|
|
181
181
|
"deprecated": false
|