bestax-mcp 1.18.65 → 1.18.67

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.
Files changed (38) hide show
  1. package/data/catalog.json +1 -1
  2. package/data/components/Button.json +2 -2
  3. package/data/components/Buttons.json +5 -5
  4. package/data/components/Cascader.json +2 -2
  5. package/data/components/ColorInput.json +3 -3
  6. package/data/components/Combobox.json +2 -2
  7. package/data/components/ContextMenu.json +2 -2
  8. package/data/components/CopyButton.json +1 -1
  9. package/data/components/DateInput.json +3 -3
  10. package/data/components/DateRangeInput.json +3 -3
  11. package/data/components/DateTimeInput.json +3 -3
  12. package/data/components/Delete.json +1 -1
  13. package/data/components/Dropdown.json +2 -2
  14. package/data/components/FloatButton.json +2 -2
  15. package/data/components/HoverCard.json +2 -2
  16. package/data/components/IconButton.json +2 -2
  17. package/data/components/Link.json +2 -2
  18. package/data/components/LinkButton.json +1 -1
  19. package/data/components/Loading.json +6 -6
  20. package/data/components/Notification.json +1 -1
  21. package/data/components/Popover.json +3 -3
  22. package/data/components/Progress.json +3 -3
  23. package/data/components/Sidebar.json +1 -1
  24. package/data/components/Slider.json +2 -2
  25. package/data/components/Table.json +4 -4
  26. package/data/components/Tag.json +4 -4
  27. package/data/components/Tags.json +5 -5
  28. package/data/components/TimeInput.json +3 -3
  29. package/data/components/Timeline.json +5 -5
  30. package/data/components/ToggleButton.json +2 -2
  31. package/data/components/Tour.json +3 -3
  32. package/data/components/TreeSelect.json +2 -2
  33. package/data/components/UnorderedList.json +12 -2
  34. package/data/skills/bestax-migrate/references/bulma-classes/component-map.md +3 -0
  35. package/data/skills/bestax-optimize/references/modular-build.md +21 -5
  36. package/data/skills/bestax-theming/references/css-variables.md +30 -17
  37. package/data/skills/bestax-theming/references/themeable-components.md +3 -3
  38. package/package.json +2 -2
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.73.4"
5
+ "version": "5.73.6"
6
6
  },
7
7
  "docsBase": "https://bestax.io/docs",
8
8
  "categories": [
@@ -101,7 +101,7 @@
101
101
  "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
102
  }
103
103
  ],
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- **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, and forced colors (Windows' contrast themes) drops the shadow and sets the border's color, so bestax's styles give a focused ghost 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.\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:::",
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- **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.\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:::",
105
105
  "related": [
106
106
  "Buttons",
107
107
  "CopyButton",
@@ -170,7 +170,7 @@
170
170
  "name": "isLoading",
171
171
  "type": "boolean",
172
172
  "default": "false",
173
- "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
173
+ "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. It keeps focus, and shows Bulma's focus outline while it has it from the keyboard. Bulma alone hides only the label and takes away the shadow that shows a focused button, so the rest needs bestax's CSS loaded.",
174
174
  "required": false,
175
175
  "inherited": false,
176
176
  "deprecated": false
@@ -193,7 +193,7 @@
193
193
  "name": "isLoading",
194
194
  "type": "boolean",
195
195
  "default": "false",
196
- "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
196
+ "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. It keeps focus, and shows Bulma's focus outline while it has it from the keyboard. Bulma alone hides only the label and takes away the shadow that shows a focused button, so the rest needs bestax's CSS loaded.",
197
197
  "required": false,
198
198
  "inherited": false,
199
199
  "deprecated": false
@@ -387,7 +387,7 @@
387
387
  "name": "isLoading",
388
388
  "type": "boolean",
389
389
  "default": "false",
390
- "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
390
+ "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. It keeps focus, and shows Bulma's focus outline while it has it from the keyboard. Bulma alone hides only the label and takes away the shadow that shows a focused button, so the rest needs bestax's CSS loaded.",
391
391
  "required": false,
392
392
  "inherited": true,
393
393
  "deprecated": false
@@ -563,7 +563,7 @@
563
563
  "name": "isLoading",
564
564
  "type": "boolean",
565
565
  "default": "false",
566
- "description": "Shows Bulma's spinner in place of its content and holds the toggle where it is: a click, Enter or Space does nothing, so neither `onClick` nor `onPressedChange` fires, until it's cleared. Set it while a change is saving. The button carries `aria-busy` and `aria-disabled` meanwhile, and stays focusable, so focus isn't lost mid-save. Everything inside it is hidden behind the spinner, in forced colors (Windows' contrast themes) too, and under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
566
+ "description": "Shows Bulma's spinner in place of its content and holds the toggle where it is: a click, Enter or Space does nothing, so neither `onClick` nor `onPressedChange` fires, until it's cleared. Set it while a change is saving. The button carries `aria-busy` and `aria-disabled` meanwhile, and stays focusable, so focus isn't lost mid-save, with Bulma's focus outline showing it from the keyboard. Everything inside it is hidden behind the spinner, in forced colors (Windows' contrast themes) too, and under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label and takes away the shadow that shows a focused button, so the rest needs bestax's CSS loaded.",
567
567
  "required": false,
568
568
  "inherited": false,
569
569
  "deprecated": false
@@ -746,7 +746,7 @@
746
746
  "name": "isLoading",
747
747
  "type": "boolean",
748
748
  "default": "false",
749
- "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
749
+ "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. It keeps focus, and shows Bulma's focus outline while it has it from the keyboard. Bulma alone hides only the label and takes away the shadow that shows a focused button, so the rest needs bestax's CSS loaded.",
750
750
  "required": false,
751
751
  "inherited": true,
752
752
  "deprecated": false
@@ -985,7 +985,7 @@
985
985
  "name": "isLoading",
986
986
  "type": "boolean",
987
987
  "default": "false",
988
- "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
988
+ "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. It keeps focus, and shows Bulma's focus outline while it has it from the keyboard. Bulma alone hides only the label and takes away the shadow that shows a focused button, so the rest needs bestax's CSS loaded.",
989
989
  "required": false,
990
990
  "inherited": true,
991
991
  "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.",
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.",
46
46
  "related": [
47
47
  "Combobox",
48
48
  "Select",
@@ -362,7 +362,7 @@
362
362
  "name": "position",
363
363
  "type": "'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'auto'",
364
364
  "default": "'bottom-left'",
365
- "description": "Where the panel opens against the field, as on the pickers. Left out, it opens below and lines up with the field's start edge, which is its right edge on a right-to-left page. A corner you pass stays physical, so `bottom-left` lines up the left edges either way.",
365
+ "description": "Where the panel opens against the field, as on the pickers. Left out, it opens below and lines up with the field's start edge, which is its right edge on a right-to-left page. A corner you pass stays physical, so `bottom-left` lines up the left edges either way. A panel that would run past the viewport's left or right edge keeps its corner and moves sideways, just far enough to fit or, wider than the viewport, to the edge its text starts from.",
366
366
  "required": false,
367
367
  "inherited": false,
368
368
  "deprecated": false
@@ -50,7 +50,7 @@
50
50
  "code": "<Field label=\"Bare\">\n <Control>\n <ColorInputBase defaultValue=\"#ff6685\" />\n </Control>\n</Field>"
51
51
  }
52
52
  ],
53
- "accessibility": "- **The field is a combobox that opens a dialog**, as the date pickers' is: `role=\"combobox\"`,\n `aria-haspopup=\"dialog\"`, `aria-expanded` and `aria-controls`, named by its `label`. The\n launcher is a button named \"Choose color\" with the same attributes.\n- **Keys in the field:** Alt+ArrowDown opens the panel; Enter commits typed text; Escape puts\n typed text back without closing a `Modal` around the field.\n- **The panel** is a non-modal `dialog` named \"Choose color\" that holds focus while it's open.\n Focus starts on the saturation and brightness square, and Escape, Alt+ArrowUp or a press\n outside closes it and hands focus back to the field.\n- **The square and the sliders** are `ColorPicker`'s: native range inputs, the square one 2D\n slider with one tab stop. See [`ColorPicker`](https://bestax.io/docs/api/form/colorpicker#accessibility).\n- **The swatch in the field** is for the pointer only: it's hidden from assistive tech and takes\n no tab stop, since the launcher does the same from the keyboard.\n- **The value is always text** in the field, and text it can't read is marked `aria-invalid`.\n- **Forced colors:** the swatch keeps its color with an edge in the system's text color.\n- **Strings** come from `labels`, with English defaults.",
53
+ "accessibility": "- **The field is a combobox that opens a dialog**, as the date pickers' is: `role=\"combobox\"`,\n `aria-haspopup=\"dialog\"`, `aria-expanded` and `aria-controls`, named by its `label`. The\n launcher is a button named \"Choose color\" with the same attributes.\n- **Keys in the field:** Alt+ArrowDown opens the panel; Enter commits typed text; Escape puts\n typed text back without closing a `Modal` around the field.\n- **The panel** is a non-modal `dialog` named \"Choose color\" that holds focus while it's open.\n Focus starts on the saturation and brightness square, and Escape, Alt+ArrowUp or a press\n outside closes it and hands focus back to the field.\n- **The square and the sliders** are `ColorPicker`'s: native range inputs, the square one 2D\n slider with one tab stop. See [`ColorPicker`](https://bestax.io/docs/api/form/colorpicker#accessibility).\n- **The swatch in the field** is for the pointer only: it's hidden from assistive tech and takes\n no tab stop, since the launcher does the same from the keyboard.\n- **The value is always text** in the field, and text it can't read is marked `aria-invalid`.\n- **Forced colors:** the swatch keeps its color with an edge in the system's text color.\n- **Strings** come from `labels`, with English defaults.\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.",
54
54
  "related": ["ColorPicker", "ColorSwatch", "DateInput", "useBulmaClasses"],
55
55
  "storybook": "https://bestax.io/storybook/?path=/story/form-colorinput--default",
56
56
  "summary": "The `ColorInput` component is a form field for a color: type it, or open a color picker from its launcher or its swatch. The value is a CSS color string, HSL by default, or empty. The panel is the `ColorPicker`'s square, hue slider and, when asked for, alpha slider, swatches and eye dropper, in the same popover the date pickers use.",
@@ -283,7 +283,7 @@
283
283
  "name": "position",
284
284
  "type": "'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'auto'",
285
285
  "default": "'bottom-left'",
286
- "description": "Where the panel opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way.",
286
+ "description": "Where the panel opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way. A panel that would run past the viewport's left or right edge keeps its corner and moves sideways, just far enough to fit or, wider than the viewport, to the edge its text starts from.",
287
287
  "required": false,
288
288
  "inherited": true,
289
289
  "deprecated": false
@@ -529,7 +529,7 @@
529
529
  "name": "position",
530
530
  "type": "'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'auto'",
531
531
  "default": "'bottom-left'",
532
- "description": "Where the panel opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way.",
532
+ "description": "Where the panel opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way. A panel that would run past the viewport's left or right edge keeps its corner and moves sideways, just far enough to fit or, wider than the viewport, to the edge its text starts from.",
533
533
  "required": false,
534
534
  "inherited": false,
535
535
  "deprecated": false
@@ -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.",
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.",
66
66
  "related": [
67
67
  "Autocomplete",
68
68
  "Cascader",
@@ -314,7 +314,7 @@
314
314
  "name": "position",
315
315
  "type": "'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'auto'",
316
316
  "default": "'bottom-left'",
317
- "description": "Where the menu opens against the field: below (`bottom-*`) or above (`top-*`), lined up with its left or right edge. `auto` picks the one that keeps the list in the viewport, preferring below. The same union Popover takes. Left out, it opens below and lines up with the field's start edge, which is its right edge on a right-to-left page, so a menu wider than the field doesn't hang off the screen. A corner you pass stays physical, so `bottom-left` lines up the left edges on either page.",
317
+ "description": "Where the menu opens against the field: below (`bottom-*`) or above (`top-*`), lined up with its left or right edge. `auto` picks the one that keeps the list in the viewport, preferring below. The same union Popover takes. Left out, it opens below and lines up with the field's start edge, which is its right edge on a right-to-left page, so a menu wider than the field doesn't hang off the screen. A corner you pass stays physical, so `bottom-left` lines up the left edges on either page. A panel that would run past the viewport's left or right edge keeps its corner and moves sideways, just far enough to fit or, wider than the viewport, to the edge its text starts from.",
318
318
  "required": false,
319
319
  "inherited": true,
320
320
  "deprecated": false
@@ -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- 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`.\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`.\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.",
42
42
  "related": [
43
43
  "ConfigProvider",
44
44
  "Dropdown",
@@ -145,7 +145,7 @@
145
145
  "name": "active",
146
146
  "type": "boolean",
147
147
  "default": "false",
148
- "description": "Whether the item is active.",
148
+ "description": "Marks the item as the current one. It adds Bulma's `is-active` class, and `aria-current=\"true\"`, so assistive tech can tell which item is current too. An `aria-current` you pass wins, `false` and `undefined` included, so an item that says its state another way, such as a `menuitemradio` with `aria-checked`, takes `aria-current={false}`.",
149
149
  "required": false,
150
150
  "inherited": false,
151
151
  "deprecated": false
@@ -166,7 +166,7 @@
166
166
  "name": "isLoading",
167
167
  "type": "boolean",
168
168
  "default": "false",
169
- "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
169
+ "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. It keeps focus, and shows Bulma's focus outline while it has it from the keyboard. Bulma alone hides only the label and takes away the shadow that shows a focused button, so the rest needs bestax's CSS loaded.",
170
170
  "required": false,
171
171
  "inherited": true,
172
172
  "deprecated": false
@@ -178,7 +178,7 @@
178
178
  "code": "function example() {\n return (\n <Field\n horizontal\n label=\"Date\"\n labelProps={{ htmlFor: 'date-field-control' }}\n >\n <Field.Body>\n <Field>\n <Control iconLeftName=\"calendar-alt\">\n <DateInput id=\"date-field-control\" placeholder=\"YYYY-MM-DD\" />\n </Control>\n </Field>\n </Field.Body>\n </Field>\n );\n}"
179
179
  }
180
180
  ],
181
- "accessibility": "- Trigger uses `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded`, and `aria-controls`.\n- Popover panel has `role=\"dialog\"` with an accessible name. Opening it puts focus on the focused date, month or year.\n- Closing the popover with `Escape` or a pick returns focus to the input, whether the input or the launcher opened it. Under `openOnFocus` that returning focus leaves the popover closed; focusing or clicking the input again opens it. Dismissing without a pick commits nothing: an empty field stays empty, and leaving afterwards commits only what you typed.\n- Calendar uses `role=\"grid\"` with cells as `role=\"gridcell\"`. Its first row holds the weekday names as `role=\"columnheader\"`s, each named by the full weekday in the picker's locale, so a screen reader can name the weekday as focus moves to another column. A server-rendered calendar adds those full names once the page hydrates, and with `dayNames` the columns are named by the names you give instead. Each day keeps its number as its name.\n- Cells expose `aria-selected`, `aria-disabled`, and `aria-current=\"date\"` for today. On a server-rendered page, today's day, month and year get it once the page hydrates, so the reader's clock decides which.\n- A `disabled` inline calendar puts `aria-disabled=\"true\"` on its grid or year list and disables every button in it. A `readOnly` one puts `aria-readonly=\"true\"` on the grid or year list it picks from, and keeps its tab stop and keys.\n- Roving `tabindex` keeps a single grid cell focusable at a time, and focus moves with it, inline as in the popover. When the focused date is disabled, that cell is the nearest enabled day of the month.\n- Closing the year list opened from the header, with a pick or `Escape`, puts focus back on the grid's tab stop, inline as in the popover.\n- The month grid is a `role=\"grid\"` of `role=\"row\"`s, labelled by the year in its header. Each month cell carries the full month name as its accessible name, `aria-current=\"date\"` for this month and `aria-disabled` for a month with no selectable day.\n- The year list is a `role=\"listbox\"`, named by the `chooseYear` label where it is the selection surface and by the heading that opens it otherwise. As the selection surface its options take `aria-selected` from the value's year rather than from focus, which roves through the list. When the focused year is disabled, the nearest enabled year takes the tab stop, so `Tab` still reaches the list.\n- The launcher and popover are named \"Choose month\" or \"Choose year\" to match the granularity; override them, and the month grid's \"Previous year\" / \"Next year\" buttons, through `labels` (`chooseMonth`, `chooseYear`, `prevYear`, `nextYear`).\n- Honors `prefers-reduced-motion` (skip popover fade-in).\n- On a right-to-left page the launcher sits at the end of the line and the calendar icon at the start, and the previous-month chevron points right. The month names follow the page.",
181
+ "accessibility": "- Trigger uses `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded`, and `aria-controls`.\n- Popover panel has `role=\"dialog\"` with an accessible name. Opening it puts focus on the focused date, month or year.\n- Closing the popover with `Escape` or a pick returns focus to the input, whether the input or the launcher opened it. Under `openOnFocus` that returning focus leaves the popover closed; focusing or clicking the input again opens it. Dismissing without a pick commits nothing: an empty field stays empty, and leaving afterwards commits only what you typed.\n- Calendar uses `role=\"grid\"` with cells as `role=\"gridcell\"`. Its first row holds the weekday names as `role=\"columnheader\"`s, each named by the full weekday in the picker's locale, so a screen reader can name the weekday as focus moves to another column. A server-rendered calendar adds those full names once the page hydrates, and with `dayNames` the columns are named by the names you give instead. Each day keeps its number as its name.\n- Cells expose `aria-selected`, `aria-disabled`, and `aria-current=\"date\"` for today. On a server-rendered page, today's day, month and year get it once the page hydrates, so the reader's clock decides which.\n- A `disabled` inline calendar puts `aria-disabled=\"true\"` on its grid or year list and disables every button in it. A `readOnly` one puts `aria-readonly=\"true\"` on the grid or year list it picks from, and keeps its tab stop and keys.\n- Roving `tabindex` keeps a single grid cell focusable at a time, and focus moves with it, inline as in the popover. When the focused date is disabled, that cell is the nearest enabled day of the month.\n- Closing the year list opened from the header, with a pick or `Escape`, puts focus back on the grid's tab stop, inline as in the popover.\n- The month grid is a `role=\"grid\"` of `role=\"row\"`s, labelled by the year in its header. Each month cell carries the full month name as its accessible name, `aria-current=\"date\"` for this month and `aria-disabled` for a month with no selectable day.\n- The year list is a `role=\"listbox\"`, named by the `chooseYear` label where it is the selection surface and by the heading that opens it otherwise. As the selection surface its options take `aria-selected` from the value's year rather than from focus, which roves through the list. When the focused year is disabled, the nearest enabled year takes the tab stop, so `Tab` still reaches the list.\n- The launcher and popover are named \"Choose month\" or \"Choose year\" to match the granularity; override them, and the month grid's \"Previous year\" / \"Next year\" buttons, through `labels` (`chooseMonth`, `chooseYear`, `prevYear`, `nextYear`).\n- Honors `prefers-reduced-motion` (skip popover fade-in).\n- On a right-to-left page the launcher sits at the end of the line and the calendar icon at the start, and the previous-month chevron points right. The month names follow the page.\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.",
182
182
  "related": ["DateTimeInput", "Input", "TimeInput"],
183
183
  "storybook": "https://bestax.io/storybook/?path=/story/form-dateinput",
184
184
  "summary": "The `DateInput` component is a form input that opens a popover calendar for date selection.",
@@ -546,7 +546,7 @@
546
546
  "name": "position",
547
547
  "type": "'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'auto'",
548
548
  "default": "'bottom-left'",
549
- "description": "Where the popover opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way.",
549
+ "description": "Where the popover opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way. A panel that would run past the viewport's left or right edge keeps its corner and moves sideways, just far enough to fit or, wider than the viewport, to the edge its text starts from.",
550
550
  "required": false,
551
551
  "inherited": true,
552
552
  "deprecated": false
@@ -909,7 +909,7 @@
909
909
  "name": "position",
910
910
  "type": "'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'auto'",
911
911
  "default": "'bottom-left'",
912
- "description": "Where the popover opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way.",
912
+ "description": "Where the popover opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way. A panel that would run past the viewport's left or right edge keeps its corner and moves sideways, just far enough to fit or, wider than the viewport, to the edge its text starts from.",
913
913
  "required": false,
914
914
  "inherited": false,
915
915
  "deprecated": false
@@ -50,7 +50,7 @@
50
50
  "code": "<Field label=\"Leave\">\n <Control iconLeftName=\"calendar-alt\">\n <DateRangeInput />\n </Control>\n</Field>"
51
51
  }
52
52
  ],
53
- "accessibility": "- The root is a `role=\"group\"` named by `label` through `aria-labelledby`, since the label names two inputs rather than one. Inside a labeled `Field`, that `Field`'s label names the group the same way, whether the `Field` holds `DateRangeInput` or a `DateRangeInputBase` you composed in a `Control` yourself, `inline` or not. An `aria-label` or `aria-labelledby` you give the group wins over either label.\n- Each input is a `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded` and `aria-controls`, and its own name: \"Start date\" or \"End date\", from the `labels` keys `rangeStart` and `rangeEnd`. The separator between them is hidden from assistive technology.\n- The popover is a `role=\"dialog\"` named \"Choose date range\" (`labels.chooseDateRange`). Opening it puts focus on the calendar's focused day, and closing it returns focus to the input you were last in, or to the start input.\n- With `monthsToShow`, each month is a grid of its own, named by its month and year, and the calendar keeps one tab stop across them.\n- The day grid is `aria-multiselectable`, and its days sit in a `role=\"row\"` per week. Every day of the range is `aria-selected`, both ends included. While the end is still being picked, only the start is: the preview is not a selection.\n- A `disabled` inline calendar puts `aria-disabled=\"true\"` on its grid and disables every button in it. A `readOnly` one puts `aria-readonly=\"true\"` there instead, keeps its tab stop and keys, and picks nothing.\n- The start and end days are described as \"Start date\" and \"End date\", so moving onto either says which it is. While the end is still being picked, the day the range would end on is described as \"Choose as end date\" (`labels.rangePreviewEnd`).\n- A polite live region in the calendar states the range in words, such as \"Start date: June 10, 2024, End date: June 13, 2024\", and announces each pick. The grid points at it too, so moving into the grid reads the current range.\n- Everything else is the calendar `DateInput` uses: a roving `tabindex`, weekday column headers named in full (or by your `dayNames`), `aria-disabled` on disabled days, `aria-current=\"date\"` on today, and focus back on the grid as the year list closes.\n- On a right-to-left page the launcher sits at the end of the line and the calendar icon at the start, and the previous-month chevron points right.",
53
+ "accessibility": "- The root is a `role=\"group\"` named by `label` through `aria-labelledby`, since the label names two inputs rather than one. Inside a labeled `Field`, that `Field`'s label names the group the same way, whether the `Field` holds `DateRangeInput` or a `DateRangeInputBase` you composed in a `Control` yourself, `inline` or not. An `aria-label` or `aria-labelledby` you give the group wins over either label.\n- Each input is a `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded` and `aria-controls`, and its own name: \"Start date\" or \"End date\", from the `labels` keys `rangeStart` and `rangeEnd`. The separator between them is hidden from assistive technology.\n- The popover is a `role=\"dialog\"` named \"Choose date range\" (`labels.chooseDateRange`). Opening it puts focus on the calendar's focused day, and closing it returns focus to the input you were last in, or to the start input.\n- With `monthsToShow`, each month is a grid of its own, named by its month and year, and the calendar keeps one tab stop across them.\n- The day grid is `aria-multiselectable`, and its days sit in a `role=\"row\"` per week. Every day of the range is `aria-selected`, both ends included. While the end is still being picked, only the start is: the preview is not a selection.\n- A `disabled` inline calendar puts `aria-disabled=\"true\"` on its grid and disables every button in it. A `readOnly` one puts `aria-readonly=\"true\"` there instead, keeps its tab stop and keys, and picks nothing.\n- The start and end days are described as \"Start date\" and \"End date\", so moving onto either says which it is. While the end is still being picked, the day the range would end on is described as \"Choose as end date\" (`labels.rangePreviewEnd`).\n- A polite live region in the calendar states the range in words, such as \"Start date: June 10, 2024, End date: June 13, 2024\", and announces each pick. The grid points at it too, so moving into the grid reads the current range.\n- Everything else is the calendar `DateInput` uses: a roving `tabindex`, weekday column headers named in full (or by your `dayNames`), `aria-disabled` on disabled days, `aria-current=\"date\"` on today, and focus back on the grid as the year list closes.\n- On a right-to-left page the launcher sits at the end of the line and the calendar icon at the start, and the previous-month chevron points right.\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.",
54
54
  "related": ["DateInput", "DateTimeInput", "Field"],
55
55
  "storybook": "https://bestax.io/storybook/?path=/story/form-daterangeinput",
56
56
  "summary": "The `DateRangeInput` component is a form input for a start and end date, picked from one popover calendar or typed into two segmented inputs.",
@@ -409,7 +409,7 @@
409
409
  "name": "position",
410
410
  "type": "'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'auto'",
411
411
  "default": "'bottom-left'",
412
- "description": "Where the popover opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way.",
412
+ "description": "Where the popover opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way. A panel that would run past the viewport's left or right edge keeps its corner and moves sideways, just far enough to fit or, wider than the viewport, to the edge its text starts from.",
413
413
  "required": false,
414
414
  "inherited": true,
415
415
  "deprecated": false
@@ -808,7 +808,7 @@
808
808
  "name": "position",
809
809
  "type": "'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'auto'",
810
810
  "default": "'bottom-left'",
811
- "description": "Where the popover opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way.",
811
+ "description": "Where the popover opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way. A panel that would run past the viewport's left or right edge keeps its corner and moves sideways, just far enough to fit or, wider than the viewport, to the edge its text starts from.",
812
812
  "required": false,
813
813
  "inherited": false,
814
814
  "deprecated": false
@@ -170,7 +170,7 @@
170
170
  "code": "<DateTimeInput label=\"Input only\" popover={false} defaultValue={new Date()} />"
171
171
  }
172
172
  ],
173
- "accessibility": "- Trigger uses `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded`, and `aria-controls`.\n- Popover panel has `role=\"dialog\"` with an accessible name. Opening it puts focus on the focused date.\n- Closing the popover with `Escape`, the ✓ button or `Enter` on a time wheel returns focus to the input, whether the input or the launcher opened it. Under `openOnFocus` that returning focus leaves the popover closed; focusing or clicking the input again opens it. Closing it commits nothing by itself: an empty field stays empty, and leaving afterwards commits only what you typed, so seconds the display leaves out are kept.\n- Calendar uses `role=\"grid\"`. Its first row holds the weekday names as `role=\"columnheader\"`s, each named by the full weekday in the picker's locale, so a screen reader can name the weekday as focus moves to another column. A server-rendered calendar adds those full names once the page hydrates, and with `dayNames` the columns are named by the names you give instead. Each day keeps its number as its name.\n- Cells expose `aria-selected`, `aria-disabled`, and `aria-current=\"date\"` for today. On a server-rendered page, today gets it once the page hydrates, so the reader's clock decides which day.\n- Roving `tabindex` keeps a single day focusable at a time, and focus moves with it, inline as in the popover. When the focused date is disabled, that cell is the nearest enabled day of the month.\n- Closing the year list opened from the header, with a pick or `Escape`, puts focus back on the grid's tab stop, inline as in the popover.\n- A `disabled` inline panel puts `aria-disabled=\"true\"` on its grid and disables every button in it. A `readOnly` one puts `aria-readonly=\"true\"` there instead, and keeps its tab stop and keys.\n- Each time wheel uses `role=\"spinbutton\"` with `aria-valuemin`, `aria-valuemax`, `aria-valuenow`, and `aria-valuetext`, whose text is the number as the wheel shows it, in the picker's locale's digits when it has a locale. The values drawn above and below are click targets hidden from assistive technology, which reads the value from the spinbutton.\n- In a 12-hour picker, AM/PM is one of those wheels, reading `AM` or `PM`, or the picker's locale's words for them when it has a locale, and it widens to fit a longer word. Its accessible name is `AM/PM` unless `labels.ampm` sets another.\n- The footer's confirm button exposes an accessible label (`Done`); the Reset button reverts your edits to the value the popover opened with, or on an `inline` picker, to the one described under [Inline](https://bestax.io/docs/api/form/datetime/datetimeinput#inline).\n- Tab order walks from the calendar to the footer (Reset / ✓), and from the time wheels to the footer while they are open.\n- On a right-to-left page the launcher sits at the end of the line and the calendar icon at the start. The time wheels keep `dir=\"ltr\"`.",
173
+ "accessibility": "- Trigger uses `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded`, and `aria-controls`.\n- Popover panel has `role=\"dialog\"` with an accessible name. Opening it puts focus on the focused date.\n- Closing the popover with `Escape`, the ✓ button or `Enter` on a time wheel returns focus to the input, whether the input or the launcher opened it. Under `openOnFocus` that returning focus leaves the popover closed; focusing or clicking the input again opens it. Closing it commits nothing by itself: an empty field stays empty, and leaving afterwards commits only what you typed, so seconds the display leaves out are kept.\n- Calendar uses `role=\"grid\"`. Its first row holds the weekday names as `role=\"columnheader\"`s, each named by the full weekday in the picker's locale, so a screen reader can name the weekday as focus moves to another column. A server-rendered calendar adds those full names once the page hydrates, and with `dayNames` the columns are named by the names you give instead. Each day keeps its number as its name.\n- Cells expose `aria-selected`, `aria-disabled`, and `aria-current=\"date\"` for today. On a server-rendered page, today gets it once the page hydrates, so the reader's clock decides which day.\n- Roving `tabindex` keeps a single day focusable at a time, and focus moves with it, inline as in the popover. When the focused date is disabled, that cell is the nearest enabled day of the month.\n- Closing the year list opened from the header, with a pick or `Escape`, puts focus back on the grid's tab stop, inline as in the popover.\n- A `disabled` inline panel puts `aria-disabled=\"true\"` on its grid and disables every button in it. A `readOnly` one puts `aria-readonly=\"true\"` there instead, and keeps its tab stop and keys.\n- Each time wheel uses `role=\"spinbutton\"` with `aria-valuemin`, `aria-valuemax`, `aria-valuenow`, and `aria-valuetext`, whose text is the number as the wheel shows it, in the picker's locale's digits when it has a locale. The values drawn above and below are click targets hidden from assistive technology, which reads the value from the spinbutton.\n- In a 12-hour picker, AM/PM is one of those wheels, reading `AM` or `PM`, or the picker's locale's words for them when it has a locale, and it widens to fit a longer word. Its accessible name is `AM/PM` unless `labels.ampm` sets another.\n- The footer's confirm button exposes an accessible label (`Done`); the Reset button reverts your edits to the value the popover opened with, or on an `inline` picker, to the one described under [Inline](https://bestax.io/docs/api/form/datetime/datetimeinput#inline).\n- Tab order walks from the calendar to the footer (Reset / ✓), and from the time wheels to the footer while they are open.\n- On a right-to-left page the launcher sits at the end of the line and the calendar icon at the start. The time wheels keep `dir=\"ltr\"`.\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.",
174
174
  "related": ["DateInput", "Input", "TimeInput"],
175
175
  "storybook": "https://bestax.io/storybook/?path=/story/form-datetimeinput",
176
176
  "summary": "The `DateTimeInput` combines a calendar and a time **wheel spinner** in a single popover — an iOS-style layout.",
@@ -529,7 +529,7 @@
529
529
  "name": "position",
530
530
  "type": "'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'auto'",
531
531
  "default": "'bottom-left'",
532
- "description": "Where the popover opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way.",
532
+ "description": "Where the popover opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way. A panel that would run past the viewport's left or right edge keeps its corner and moves sideways, just far enough to fit or, wider than the viewport, to the edge its text starts from.",
533
533
  "required": false,
534
534
  "inherited": true,
535
535
  "deprecated": false
@@ -955,7 +955,7 @@
955
955
  "name": "position",
956
956
  "type": "'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'auto'",
957
957
  "default": "'bottom-left'",
958
- "description": "Where the popover opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way.",
958
+ "description": "Where the popover opens against the field. Left out, it opens below and lines up with the field's start edge, which is its right edge when the picker reads right to left. A corner you pass stays physical, so `bottom-left` lines up the left edges either way. A panel that would run past the viewport's left or right edge keeps its corner and moves sideways, just far enough to fit or, wider than the viewport, to the edge its text starts from.",
959
959
  "required": false,
960
960
  "inherited": false,
961
961
  "deprecated": false
@@ -31,7 +31,7 @@
31
31
  "code": "<Message color=\"success\" title=\"Success Message\">\n This is a success message with a delete button in the header.\n</Message>"
32
32
  }
33
33
  ],
34
- "accessibility": "- **ARIA label:** Always set a meaningful `ariaLabel` for screen readers (default is `'Close'`).\n- **Keyboard:** The button is focusable and supports keyboard activation.\n- **Forms:** It renders `type=\"button\"`, so a delete button inside a form doesn't submit it.\n- **Disabled:** Uses both `disabled` and Bulma’s `is-disabled` for proper styling and accessibility.\n- **Forced colors:** Bulma draws the circle and the cross as background colors, which forced colors (Windows' contrast themes) replaces, so the button would vanish there while it still works and takes focus. bestax's styles keep it drawn in the system's button colors, with its focus ring in the system's highlight color, and a disabled one, or one inside a disabled `<fieldset>`, in the system's color for disabled controls. Every close button bestax renders is a `Delete`, apart from the [Modal](https://bestax.io/docs/api/components/modal)'s floating close and a [Tag](https://bestax.io/docs/api/elements/tag) with `isDelete`, and those are drawn the same way.\n\n:::tip\nFor custom close actions, use the `onClick` prop.\n:::",
34
+ "accessibility": "- **ARIA label:** Always set a meaningful `ariaLabel` for screen readers (default is `'Close'`).\n- **Keyboard:** The button is focusable and supports keyboard activation.\n- **Forms:** It renders `type=\"button\"`, so a delete button inside a form doesn't submit it.\n- **Disabled:** Uses both `disabled` and Bulma’s `is-disabled` for proper styling and accessibility.\n- **Forced colors:** Bulma draws the circle and the cross as background colors, which forced colors (Windows' contrast themes) replaces, so the button would vanish there while it still works and takes focus. bestax's styles keep it drawn in the system's button colors, with its focus ring in the system's highlight color, and a disabled one, or one inside a disabled `<fieldset>`, in the system's color for disabled controls. Every close button bestax renders is a `Delete`, apart from the [Modal](https://bestax.io/docs/api/components/modal)'s floating close, a [Tag](https://bestax.io/docs/api/elements/tag) with `isDelete`, and the [Sidebar](https://bestax.io/docs/api/components/sidebar)'s `Sidebar.Close`, and those keep their crosses in the system's colors too.\n\n:::tip\nFor custom close actions, use the `onClick` prop.\n:::",
35
35
  "related": ["Message", "Notification", "Tag", "useBulmaClasses"],
36
36
  "storybook": "https://bestax.io/storybook/?path=/story/elements-delete--default",
37
37
  "summary": "The `Delete` component provides a Bulma-styled close/delete button for dismissing modals, notifications, tags, messages, and more. It renders `type=\"button\"`, so a delete button inside a form does not submit it.",
@@ -42,7 +42,7 @@
42
42
  "code": "<Dropdown label=\"Dropdown Menu\" active>\n <Dropdown.Item>First Item</Dropdown.Item>\n <Dropdown.Item>Second Item</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item>Third Item</Dropdown.Item>\n</Dropdown>"
43
43
  }
44
44
  ],
45
- "accessibility": "- The trigger is a `<button>` with `aria-haspopup=\"true\"` and `aria-expanded`, and its\n `aria-controls` points at the menu, with or without an `id` on the Dropdown.\n- The menu is `role=\"menu\"`, and `aria-labelledby` names it after the trigger, so a screen\n reader moving into it hears the trigger's label. That makes the `label` the menu's name too,\n so a trigger that shows only an icon needs text a screen reader can read, as in the\n [split button](https://bestax.io/docs/api/components/dropdown#split-button).\n- Each item is `role=\"menuitem\"`. An item given `role=\"menuitemcheckbox\"` or\n `role=\"menuitemradio\"` stays in the arrow-key order.\n- A click between items, on a divider say, focuses the menu itself, so the arrow keys still\n reach the items from there.\n- `Dropdown.Item as=\"button\"` defaults to `type=\"button\"`, so a menu item inside a form doesn't\n submit it. Pass `type=\"submit\"` or `type=\"reset\"` and yours is used instead; any other value\n renders `type=\"button\"`.\n- Pressing outside an open menu closes it.\n- A click the browser dispatches with no pointer behind it (`detail` 0), as a screen reader's\n browse mode can send when you activate the trigger, opens the menu and focuses its first enabled\n item, as <kbd>Enter</kbd> does. A pointer's click on the trigger, and a script's `click()`, open\n it and move no focus into it.\n\nThe keyboard follows the [WAI-ARIA Menu Button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/).\nUnlike the pattern's menu items, each item is also a tab stop, so <kbd>Tab</kbd> from the\ntrigger of a `hoverable` menu the pointer holds open goes through its items.\n\n- On the trigger: <kbd>ArrowDown</kbd> or <kbd>Enter</kbd>/<kbd>Space</kbd> open the menu and\n focus the first item; <kbd>ArrowUp</kbd> opens the menu and focuses the last item;\n <kbd>Escape</kbd> closes an open menu. On the trigger of a menu that's already open,\n <kbd>ArrowDown</kbd>/<kbd>ArrowUp</kbd> focus the first/last item and\n <kbd>Enter</kbd>/<kbd>Space</kbd> close it.\n- Inside the menu: <kbd>ArrowDown</kbd>/<kbd>ArrowUp</kbd> move between items and wrap around;\n <kbd>Home</kbd>/<kbd>End</kbd> jump to the first/last item; <kbd>Escape</kbd> closes the menu\n and returns focus to the trigger.\n- <kbd>Tab</kbd> in an open menu closes it and moves focus to the next tab stop after the\n Dropdown, and <kbd>Shift</kbd>+<kbd>Tab</kbd> closes it and focuses the trigger. Inside a\n focus trap, such as a `Modal`'s, a Dropdown with nothing after it sends Tab to the trap's\n first stop, as Tab from the trap's last stop does.\n- Typing a letter moves to the next item whose text starts with it, and typing it again cycles\n through the items that do. Letters typed in quick succession add up to one search, so\n <kbd>d</kbd> then <kbd>u</kbd> lands on \"Duplicate\" past \"Download\". Text hidden with\n `aria-hidden`, such as an icon's ligature name, doesn't count, and a new search starts each\n time the menu opens. Typing searches once focus is in the menu, where the trigger's keys\n above put it. A letter typed on the trigger itself does nothing.\n- On an item: <kbd>Enter</kbd> or <kbd>Space</kbd> activates it the way a click does, so its\n `onClick` runs and the menu closes unless `closeOnClick` is `false`. That includes the\n default anchor without an `href` and `as=\"div\"`, which the browser would not activate on\n its own. Holding the key down runs it once.\n- When running an item closes the menu, by click or by key, focus goes back to the trigger,\n as it does for <kbd>Escape</kbd>. An item whose `onClick` moves focus somewhere else keeps\n it there.\n- Disabled items (a `Dropdown.Item` rendered with a native `disabled` attribute or\n `aria-disabled=\"true\"`) and dividers are skipped by the arrow keys and by typing.\n- For a panel built around fields, [`Popover`](https://bestax.io/docs/api/components/popover) fits better: `role=\"menu\"` owns\n menu items, and the default `closeOnClick` shuts the menu on a click anywhere in it, a field\n included. Anything focusable you put in the menu anyway that isn't an item (a field, a\n button, a checkbox, a link without a menu-item role) keeps its own keys, so its arrows,\n <kbd>Home</kbd>, <kbd>End</kbd> and letters don't move to the items. A field needs\n `closeOnClick={false}`, or a click into it closes the menu. <kbd>Escape</kbd> and\n <kbd>Tab</kbd> still close the menu from any of them, except an <kbd>Escape</kbd> the\n control used itself by calling `preventDefault()` in its `onKeyDown`, such as an Autocomplete\n closing its list or a date picker closing its calendar.\n The next <kbd>Escape</kbd> closes the menu.",
45
+ "accessibility": "- The trigger is a `<button>` with `aria-haspopup=\"true\"` and `aria-expanded`, and its\n `aria-controls` points at the menu, with or without an `id` on the Dropdown.\n- The menu is `role=\"menu\"`, and `aria-labelledby` names it after the trigger, so a screen\n reader moving into it hears the trigger's label. That makes the `label` the menu's name too,\n so a trigger that shows only an icon needs text a screen reader can read, as in the\n [split button](https://bestax.io/docs/api/components/dropdown#split-button).\n- Each item is `role=\"menuitem\"`. An item given `role=\"menuitemcheckbox\"` or\n `role=\"menuitemradio\"` stays in the arrow-key order.\n- `Dropdown.Item active` sets `aria-current=\"true\"`, so the current item isn't only a color. An\n `aria-current` you pass wins: a menu of pages can say `\"page\"`, and `aria-current={false}`\n turns it off, as on an item that says its state with `aria-checked`.\n- A click between items, on a divider say, focuses the menu itself, so the arrow keys still\n reach the items from there.\n- `Dropdown.Item as=\"button\"` defaults to `type=\"button\"`, so a menu item inside a form doesn't\n submit it. Pass `type=\"submit\"` or `type=\"reset\"` and yours is used instead; any other value\n renders `type=\"button\"`.\n- Pressing outside an open menu closes it.\n- A click the browser dispatches with no pointer behind it (`detail` 0), as a screen reader's\n browse mode can send when you activate the trigger, opens the menu and focuses its first enabled\n item, as <kbd>Enter</kbd> does. A pointer's click on the trigger, and a script's `click()`, open\n it and move no focus into it.\n\nThe keyboard follows the [WAI-ARIA Menu Button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/).\nUnlike the pattern's menu items, each item is also a tab stop, so <kbd>Tab</kbd> from the\ntrigger of a `hoverable` menu the pointer holds open goes through its items.\n\n- On the trigger: <kbd>ArrowDown</kbd> or <kbd>Enter</kbd>/<kbd>Space</kbd> open the menu and\n focus the first item; <kbd>ArrowUp</kbd> opens the menu and focuses the last item;\n <kbd>Escape</kbd> closes an open menu. On the trigger of a menu that's already open,\n <kbd>ArrowDown</kbd>/<kbd>ArrowUp</kbd> focus the first/last item and\n <kbd>Enter</kbd>/<kbd>Space</kbd> close it.\n- Inside the menu: <kbd>ArrowDown</kbd>/<kbd>ArrowUp</kbd> move between items and wrap around;\n <kbd>Home</kbd>/<kbd>End</kbd> jump to the first/last item; <kbd>Escape</kbd> closes the menu\n and returns focus to the trigger.\n- <kbd>Tab</kbd> in an open menu closes it and moves focus to the next tab stop after the\n Dropdown, and <kbd>Shift</kbd>+<kbd>Tab</kbd> closes it and focuses the trigger. Inside a\n focus trap, such as a `Modal`'s, a Dropdown with nothing after it sends Tab to the trap's\n first stop, as Tab from the trap's last stop does.\n- Typing a letter moves to the next item whose text starts with it, and typing it again cycles\n through the items that do. Letters typed in quick succession add up to one search, so\n <kbd>d</kbd> then <kbd>u</kbd> lands on \"Duplicate\" past \"Download\". Text hidden with\n `aria-hidden`, such as an icon's ligature name, doesn't count, and a new search starts each\n time the menu opens. Typing searches once focus is in the menu, where the trigger's keys\n above put it. A letter typed on the trigger itself does nothing.\n- On an item: <kbd>Enter</kbd> or <kbd>Space</kbd> activates it the way a click does, so its\n `onClick` runs and the menu closes unless `closeOnClick` is `false`. That includes the\n default anchor without an `href` and `as=\"div\"`, which the browser would not activate on\n its own. Holding the key down runs it once.\n- When running an item closes the menu, by click or by key, focus goes back to the trigger,\n as it does for <kbd>Escape</kbd>. An item whose `onClick` moves focus somewhere else keeps\n it there.\n- Disabled items (a `Dropdown.Item` rendered with a native `disabled` attribute or\n `aria-disabled=\"true\"`) and dividers are skipped by the arrow keys and by typing.\n- For a panel built around fields, [`Popover`](https://bestax.io/docs/api/components/popover) fits better: `role=\"menu\"` owns\n menu items, and the default `closeOnClick` shuts the menu on a click anywhere in it, a field\n included. Anything focusable you put in the menu anyway that isn't an item (a field, a\n button, a checkbox, a link without a menu-item role) keeps its own keys, so its arrows,\n <kbd>Home</kbd>, <kbd>End</kbd> and letters don't move to the items. A field needs\n `closeOnClick={false}`, or a click into it closes the menu. <kbd>Escape</kbd> and\n <kbd>Tab</kbd> still close the menu from any of them, except an <kbd>Escape</kbd> the\n control used itself by calling `preventDefault()` in its `onKeyDown`, such as an Autocomplete\n closing its list or a date picker closing its calendar.\n The next <kbd>Escape</kbd> closes the menu.",
46
46
  "related": ["Button", "ContextMenu", "Popover", "useBulmaClasses"],
47
47
  "storybook": "https://bestax.io/storybook/?path=/story/components-dropdown--default",
48
48
  "summary": "The `Dropdown` component provides Bulma's versatile dropdown menu for your Bulma React UI. Down, Enter and Space on the trigger open the menu on its first enabled item, and Up opens it on its last. A click the browser dispatches with no pointer behind it (`detail` 0), as a screen reader's browse mode can send, opens it on its first enabled item too. A pointer's click on the trigger, and a script's `click()`, move no focus into the menu. On the trigger of a menu that's already open, Down and Up move focus to its first and last item. In the menu, the arrow keys, Home and End move between the items, and Enter and Space run the focused one the way a click does. Typing a letter moves to the next item whose text starts with it, skipping disabled ones, and letters typed in quick succession add up to one search. Typing searches once focus is in the menu, so a letter typed on the trigger does nothing. Escape closes the menu and focuses the trigger. Tab closes it and moves focus to the next tab stop after the Dropdown, wrapping inside a focus trap such as Modal's, and Shift+Tab closes it and focuses the trigger. Anything focusable in the menu that isn't an item, such as a field, keeps its own keys apart from Escape and Tab, though an Escape it calls `preventDefault()` on in its own `onKeyDown` stays its own and leaves the menu open. For a panel built around fields, use `Popover`.",
@@ -196,7 +196,7 @@
196
196
  "name": "active",
197
197
  "type": "boolean",
198
198
  "default": "false",
199
- "description": "Whether the item is active.",
199
+ "description": "Marks the item as the current one. It adds Bulma's `is-active` class, and `aria-current=\"true\"`, so assistive tech can tell which item is current too. An `aria-current` you pass wins, `false` and `undefined` included, so an item that says its state another way, such as a `menuitemradio` with `aria-checked`, takes `aria-current={false}`.",
200
200
  "required": false,
201
201
  "inherited": false,
202
202
  "deprecated": false
@@ -182,7 +182,7 @@
182
182
  "name": "isLoading",
183
183
  "type": "boolean",
184
184
  "default": "false",
185
- "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
185
+ "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. It keeps focus, and shows Bulma's focus outline while it has it from the keyboard. Bulma alone hides only the label and takes away the shadow that shows a focused button, so the rest needs bestax's CSS loaded.",
186
186
  "required": false,
187
187
  "inherited": true,
188
188
  "deprecated": false
@@ -584,7 +584,7 @@
584
584
  "name": "isLoading",
585
585
  "type": "boolean",
586
586
  "default": "false",
587
- "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
587
+ "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. It keeps focus, and shows Bulma's focus outline while it has it from the keyboard. Bulma alone hides only the label and takes away the shadow that shows a focused button, so the rest needs bestax's CSS loaded.",
588
588
  "required": false,
589
589
  "inherited": true,
590
590
  "deprecated": false
@@ -30,7 +30,7 @@
30
30
  "code": "function example() {\n const [open, setOpen] = useState(false);\n const [following, setFollowing] = useState(false);\n\n return (\n <>\n <Paragraph mb=\"3\">\n The card is {open ? 'open' : 'closed'}\n {following ? ', and you follow Ada' : ''}.\n </Paragraph>\n <HoverCard\n open={open}\n onOpenChange={setOpen}\n trigger={<Link href=\"#ada\">Ada Lovelace</Link>}\n >\n <Paragraph mb=\"3\">Analytical Engine team</Paragraph>\n <Button\n size=\"small\"\n color=\"primary\"\n onClick={() => {\n setFollowing(true);\n setOpen(false);\n }}\n >\n Follow\n </Button>\n </HoverCard>\n </>\n );\n}"
31
31
  }
32
32
  ],
33
- "accessibility": "`HoverCard` is built to\n[WCAG's Content on Hover or Focus](https://www.w3.org/WAI/WCAG22/Understanding/content-on-hover-or-focus.html)\ncriterion, condition by condition:\n\n- **Dismissible:** <kbd>Escape</kbd> closes the card wherever focus is, without you moving the\n pointer or focus. In controlled use it asks to close through `onOpenChange`, so the card closes\n when you set `open` to `false`. The keypress belongs to whatever has focus. When that's the card,\n its trigger or nothing, the card takes it, so a `Popover` or `Modal` around it stays open. When\n it's something else, such as a field elsewhere on the page or a `Modal` opened from the card, the\n card still closes and the key goes on to it. With one card inside another, the inner one closes\n first. Focus that was in the card goes back to the trigger, and the card stays closed until the\n pointer or focus leaves and comes back, or, with `openOnTap`, until the next tap on the trigger.\n- **Hoverable:** the pointer can move from the trigger onto the card. `closeDelay` covers the gap\n between them, and the card takes pointer events.\n- **Persistent:** no timer closes a card that's hovered or focused. Focus inside the card holds it\n however it got there. Whether a click focuses what it lands on is up to the browser, though:\n Safari and Firefox on macOS don't focus a button on click, so there a clicked button doesn't keep\n the card open once the pointer moves away.\n\nAnd around it:\n\n- Keyboard focus on the trigger opens the card, as hover does. Focus that a press brings doesn't,\n and neither does a touch pointer, so tapping the trigger on a phone just does what the trigger\n does. Clicking the trigger never toggles the card.\n- By default, then, a phone or tablet never opens the card, so whatever it shows has to be\n reachable from the trigger as well. `openOnTap` opens it with a tap, for a trigger with no tap\n action of its own. While a tap holds it open, a tap outside the trigger and the card closes it.\n- The trigger gets `aria-expanded` and `aria-controls`, which say it's expanded and name the card\n only while the card is on the page. It gets no role, no tab stop and no `aria-haspopup`, so the trigger element itself has to\n take focus, such as a link or a button. A link inside a `<span>` doesn't do, since focus comes\n back to the trigger and its ARIA is on it. A development build warns when the trigger can't take\n focus.\n- The card is a plain element with an `id` and no role. It isn't a dialog, since focus doesn't move\n into it, and it isn't a tooltip, since it can hold links. In place, a screen reader meets it\n right after the trigger, Tab goes from the trigger into its links and buttons, and tabbing past\n them closes it.\n- With `appendToBody` the card sits in the Tab order where its container is. By default that's\n the end of `<body>`, or of the overlay it's in that takes its popups, such as a `Modal`, so it\n comes last: Tab reaches it only after the rest of the page or the overlay, and focus leaving the\n trigger on the way closes it. In a dialog, a screen reader that honors its `aria-modal` reaches it there. Keyboard users can open it, read it and close it, so\n whatever it links to should be reachable from the page as well.\n- Opening the card moves no focus, and nothing traps it. Links and buttons belong in a card; a form\n belongs in a `Popover`, which opens on purpose and holds focus.\n- The fade-in is turned off under `prefers-reduced-motion: reduce`.\n- On a right-to-left page a card with no `position` lines its right edge up with the trigger's, so\n a trigger at the start of the line doesn't push the card off the screen. A `position` you pass\n stays physical: `bottom-left` lines up the left edges on either page.",
33
+ "accessibility": "`HoverCard` is built to\n[WCAG's Content on Hover or Focus](https://www.w3.org/WAI/WCAG22/Understanding/content-on-hover-or-focus.html)\ncriterion, condition by condition:\n\n- **Dismissible:** <kbd>Escape</kbd> closes the card wherever focus is, without you moving the\n pointer or focus. In controlled use it asks to close through `onOpenChange`, so the card closes\n when you set `open` to `false`. The keypress belongs to whatever has focus. When that's the card,\n its trigger or nothing, the card takes it, so a `Popover` or `Modal` around it stays open. When\n it's something else, such as a field elsewhere on the page or a `Modal` opened from the card, the\n card still closes and the key goes on to it. With one card inside another, the inner one closes\n first. Focus that was in the card goes back to the trigger, and the card stays closed until the\n pointer or focus leaves and comes back, or, with `openOnTap`, until the next tap on the trigger.\n- **Hoverable:** the pointer can move from the trigger onto the card. `closeDelay` covers the gap\n between them, and the card takes pointer events.\n- **Persistent:** no timer closes a card that's hovered or focused. Focus inside the card holds it\n however it got there. Whether a click focuses what it lands on is up to the browser, though:\n Safari and Firefox on macOS don't focus a button on click, so there a clicked button doesn't keep\n the card open once the pointer moves away.\n\nAnd around it:\n\n- Keyboard focus on the trigger opens the card, as hover does. Focus that a press brings doesn't,\n and neither does a touch pointer, so tapping the trigger on a phone just does what the trigger\n does. Clicking the trigger never toggles the card.\n- By default, then, a phone or tablet never opens the card, so whatever it shows has to be\n reachable from the trigger as well. `openOnTap` opens it with a tap, for a trigger with no tap\n action of its own. While a tap holds it open, a tap outside the trigger and the card closes it.\n- The trigger gets `aria-expanded` and `aria-controls`, which say it's expanded and name the card\n only while the card is on the page. It gets no role, no tab stop and no `aria-haspopup`, so the trigger element itself has to\n take focus, such as a link or a button. A link inside a `<span>` doesn't do, since focus comes\n back to the trigger and its ARIA is on it. A development build warns when the trigger can't take\n focus.\n- The card is a plain element with an `id` and no role. It isn't a dialog, since focus doesn't move\n into it, and it isn't a tooltip, since it can hold links. In place, a screen reader meets it\n right after the trigger, Tab goes from the trigger into its links and buttons, and tabbing past\n them closes it.\n- With `appendToBody` the card sits in the Tab order where its container is. By default that's\n the end of `<body>`, or of the overlay it's in that takes its popups, such as a `Modal`, so it\n comes last: Tab reaches it only after the rest of the page or the overlay, and focus leaving the\n trigger on the way closes it. In a dialog, a screen reader that honors its `aria-modal` reaches it there. Keyboard users can open it, read it and close it, so\n whatever it links to should be reachable from the page as well.\n- Opening the card moves no focus, and nothing traps it. Links and buttons belong in a card; a form\n belongs in a `Popover`, which opens on purpose and holds focus.\n- The fade-in is turned off under `prefers-reduced-motion: reduce`.\n- On a right-to-left page a card with no `position` lines its right edge up with the trigger's, so\n a trigger at the start of the line doesn't push the card off the screen. A `position` you pass\n stays physical: `bottom-left` lines up the left edges on either page.\n- A card that would run past the left or right edge of the screen, as on a phone with the\n trigger 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.",
34
34
  "related": ["Media", "Popover", "Portal", "Tooltip", "useBulmaClasses"],
35
35
  "storybook": "https://bestax.io/storybook/?path=/story/components-hovercard--default",
36
36
  "summary": "The `HoverCard` component shows a card previewing what's behind a link or a button while the pointer rests on it or keyboard focus is on it. Nothing moves focus when the card opens, and nothing traps it. In place, the card comes right after the trigger, so Tab goes from the trigger into its links and tabbing past them closes it. The pointer can move onto the card, Escape closes it from anywhere, and by default touch doesn't open it, so tapping the trigger just does what the trigger does. `openOnTap` opens it with a tap, for a trigger with no tap action of its own. For hints with nothing to click use `Tooltip`, and for content opened on purpose, such as a form, use `Popover`.",
@@ -110,7 +110,7 @@
110
110
  "name": "position",
111
111
  "type": "'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'auto'",
112
112
  "default": "'bottom-left'",
113
- "description": "Where the card opens against the trigger. Left out, it opens below and lines up with the trigger's start edge, which is its right edge on a right-to-left page, so a trigger at the start of the line doesn't push the card off the screen. A corner you pass stays physical, so `bottom-left` lines up the left edges on either page.",
113
+ "description": "Where the card opens against the trigger. Left out, it opens below and lines up with the trigger's start edge, which is its right edge on a right-to-left page, so a trigger at the start of the line doesn't push the card off the screen. A corner you pass stays physical, so `bottom-left` lines up the left edges on either page. A panel that would run past the viewport's left or right edge keeps its corner and moves sideways, just far enough to fit or, wider than the viewport, to the edge its text starts from.",
114
114
  "required": false,
115
115
  "inherited": false,
116
116
  "deprecated": false
@@ -54,7 +54,7 @@
54
54
  "code": "<IconButton\n as=\"a\"\n href=\"https://bulma.io/documentation/elements/button/\"\n target=\"_blank\"\n rel=\"noreferrer\"\n icon=\"arrow-up-right-from-square\"\n aria-label=\"Bulma's button docs, in a new tab\"\n/>"
55
55
  }
56
56
  ],
57
- "accessibility": "- **A name every time:** an icon-only button's name is its text alternative\n ([WCAG 1.1.1](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html) and\n [4.1.2](https://www.w3.org/WAI/WCAG22/Understanding/name-role-value.html)), so the types require\n `aria-label` or `aria-labelledby`, and a development build warns about an empty or blank one. Name\n the action, not the picture.\n- **The name is the button's:** its `aria-label` or `aria-labelledby` names it over anything inside\n it, so a name on the `Icon` is ignored, and there's no need to give one.\n- **Tooltips describe:** a [`Tooltip`](https://bestax.io/docs/api/components/tooltip) around it points the button's\n `aria-describedby` at itself, so the name and the description stay separate. Give the tooltip\n something to add, not the name again.\n- **Keyboard and focus:** it's a native `<button>`, so <kbd>Enter</kbd> and <kbd>Space</kbd> press\n it, with Bulma's focus style. `isLoading` leaves it focusable.\n- **Target size:** Bulma's smallest is 30 by 30 pixels, above the 24 by 24\n [WCAG 2.5.8](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html) asks for.\n- **Toggles** are [`ToggleButton`](https://bestax.io/docs/api/elements/togglebutton), which reports `aria-pressed`. Give an\n icon-only one an `aria-label` the same way.\n- **Forced colors:** a font icon, or an SVG drawn in `currentColor`, takes the system's text\n color, as a button's text does.",
57
+ "accessibility": "- **A name every time:** an icon-only button's name is its text alternative\n ([WCAG 1.1.1](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html) and\n [4.1.2](https://www.w3.org/WAI/WCAG22/Understanding/name-role-value.html)), so the types require\n `aria-label` or `aria-labelledby`, and a development build warns about an empty or blank one. Name\n the action, not the picture.\n- **The name is the button's:** its `aria-label` or `aria-labelledby` names it over anything inside\n it, so a name on the `Icon` is ignored, and there's no need to give one.\n- **Tooltips describe:** a [`Tooltip`](https://bestax.io/docs/api/components/tooltip) around it points the button's\n `aria-describedby` at itself, so the name and the description stay separate. Give the tooltip\n something to add, not the name again.\n- **Keyboard and focus:** it's a native `<button>`, so <kbd>Enter</kbd> and <kbd>Space</kbd> press\n it, with Bulma's focus style. `isLoading` leaves it focusable. While it loads, Bulma takes away the\n shadow that shows focus, so it shows Bulma's focus outline instead when it has keyboard focus.\n- **Target size:** Bulma's smallest is 30 by 30 pixels, above the 24 by 24\n [WCAG 2.5.8](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html) asks for.\n- **Toggles** are [`ToggleButton`](https://bestax.io/docs/api/elements/togglebutton), which reports `aria-pressed`. Give an\n icon-only one an `aria-label` the same way.\n- **Forced colors:** a font icon, or an SVG drawn in `currentColor`, takes the system's text\n color, as a button's text does.",
58
58
  "related": [
59
59
  "Button",
60
60
  "Buttons",
@@ -162,7 +162,7 @@
162
162
  "name": "isLoading",
163
163
  "type": "boolean",
164
164
  "default": "false",
165
- "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
165
+ "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. It keeps focus, and shows Bulma's focus outline while it has it from the keyboard. Bulma alone hides only the label and takes away the shadow that shows a focused button, so the rest needs bestax's CSS loaded.",
166
166
  "required": false,
167
167
  "inherited": true,
168
168
  "deprecated": false
@@ -51,7 +51,7 @@
51
51
  "code": "function example() {\n const linkRef = React.useRef<HTMLAnchorElement>(null);\n const [tag, setTag] = React.useState<string>();\n\n return (\n <>\n <Link href=\"#target\" ref={linkRef} textColor=\"primary\">\n Target\n </Link>\n <Button ml=\"2\" onClick={() => setTag(linkRef.current?.tagName)}>\n Read the tag from its ref\n </Button>\n <p>Rendered element: {tag ?? '—'}</p>\n </>\n );\n}"
52
52
  }
53
53
  ],
54
- "accessibility": "- **Descriptive Text:** Use meaningful link text that describes the destination, not generic text like \"click here\".\n- **External Links:** When opening links in new tabs, consider informing users (e.g., with an icon or text like \"opens in new tab\").\n- **Focus States:** Links inherit browser focus styles. Customize with CSS if needed.\n- **Keyboard Navigation:** Links are naturally keyboard accessible via Tab and Enter keys.\n\n:::info\nFor navigation menus, consider using the `isActive` prop to indicate the current page.\n:::\n\n:::warning Links Are for Navigation, Buttons Are for Actions\nPer [Section 508](https://www.section508.gov/) and [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) best practices, links (`<a>`) should navigate to a URL — not trigger an action via `onClick` alone. If your element performs an action (opening a modal, submitting data, toggling state, etc.) without navigating, use a [`Button`](https://bestax.io/docs/api/elements/button) or [`LinkButton`](https://bestax.io/docs/api/elements/linkbutton) instead. A `<Link href=\"#\" onClick={handleClick}>` is an anti-pattern that confuses screen readers and fails accessibility audits.\n:::",
54
+ "accessibility": "- **Descriptive Text:** Use meaningful link text that describes the destination, not generic text like \"click here\".\n- **External Links:** When opening links in new tabs, consider informing users (e.g., with an icon or text like \"opens in new tab\").\n- **Current page:** `isActive` writes `aria-current=\"page\"` beside Bulma's `is-active` class, so\n a screen reader says which link is the page you're on, the way a menu or navbar draws it. Pass\n `aria-current=\"location\"` for a section of one page, and give an active link that isn't\n navigation, such as an `as=\"button\"` toggle, `aria-current={false}`.\n- **Focus States:** Links inherit browser focus styles. Customize with CSS if needed.\n- **Keyboard Navigation:** Links are naturally keyboard accessible via Tab and Enter keys.\n\n:::info\nIn a `Menu` or a `Navbar`, mark the current item with `Menu.Item`'s or `Navbar.Item`'s `active`,\nwhich does the same for its item.\n:::\n\n:::warning Links Are for Navigation, Buttons Are for Actions\nPer [Section 508](https://www.section508.gov/) and [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) best practices, links (`<a>`) should navigate to a URL — not trigger an action via `onClick` alone. If your element performs an action (opening a modal, submitting data, toggling state, etc.) without navigating, use a [`Button`](https://bestax.io/docs/api/elements/button) or [`LinkButton`](https://bestax.io/docs/api/elements/linkbutton) instead. A `<Link href=\"#\" onClick={handleClick}>` is an anti-pattern that confuses screen readers and fails accessibility audits.\n:::",
55
55
  "related": ["Button", "Paragraph", "useBulmaClasses"],
56
56
  "storybook": "https://bestax.io/storybook/?path=/story/elements-link--default",
57
57
  "summary": "The `Link` component renders a styled anchor (`<a>`) element with Bulma helper class integration.",
@@ -106,7 +106,7 @@
106
106
  "name": "isActive",
107
107
  "type": "boolean",
108
108
  "default": "false",
109
- "description": "Whether the link appears active.",
109
+ "description": "Marks the link as the current one. It adds Bulma's `is-active` class, which Bulma's menus and navbars draw as the current page, and `aria-current=\"page\"`, so assistive tech can tell which link is current too. The `aria-current` goes to what `as` renders like any other prop, so a component of your own decides what to do with it. An `aria-current` you pass wins, even `undefined`: use it to say something else (`\"location\"` for a section of one page, say), and give an active link that isn't navigation, such as an `as=\"button\"` toggle, `aria-current={false}`.",
110
110
  "required": false,
111
111
  "inherited": false,
112
112
  "deprecated": false
@@ -108,7 +108,7 @@
108
108
  "name": "isLoading",
109
109
  "type": "boolean",
110
110
  "default": "false",
111
- "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
111
+ "description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. It keeps focus, and shows Bulma's focus outline while it has it from the keyboard. Bulma alone hides only the label and takes away the shadow that shows a focused button, so the rest needs bestax's CSS loaded.",
112
112
  "required": false,
113
113
  "inherited": true,
114
114
  "deprecated": false