bestax-mcp 1.18.77 → 1.18.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/catalog.json +1 -1
- package/data/components/Autocomplete.json +1 -1
- package/data/components/Calendar.json +1 -1
- package/data/components/Carousel.json +1 -1
- package/data/components/ColorInput.json +1 -1
- package/data/components/DateInput.json +1 -1
- package/data/components/DateRangeInput.json +1 -1
- package/data/components/DateTimeInput.json +1 -1
- package/data/components/Dropzone.json +1 -1
- package/data/components/Lightbox.json +1 -1
- package/data/components/Numberinput.json +1 -1
- package/data/components/Slider.json +3 -3
- package/data/components/TimeInput.json +1 -1
- package/data/skills/bestax-theming/references/css-variables.md +24 -0
- package/package.json +2 -2
package/data/catalog.json
CHANGED
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"code": "function example() {\n return (\n <Field\n horizontal\n label=\"Fruit\"\n labelProps={{\n htmlFor: 'fruit-field-control',\n id: 'fruit-field-control-label',\n }}\n >\n <Field.Body>\n <Field>\n <Control iconLeftName=\"search\">\n <Autocomplete\n id=\"fruit-field-control\"\n data={['Apple', 'Banana', 'Cherry']}\n placeholder=\"Search fruit...\"\n />\n </Control>\n </Field>\n </Field.Body>\n </Field>\n );\n}"
|
|
59
59
|
}
|
|
60
60
|
],
|
|
61
|
-
"accessibility": "- The `label` prop is automatically associated with the inner text input (`htmlFor` plus a generated `id`, or your own `id` if you pass one), so clicking the label focuses the input and assistive technology announces it. Inside a labeled `Field`, that `Field`'s label names the input instead when it points at it: a `Field` that is not `grouped` or `hasAddons` points it there on its own when the Autocomplete has no `id` and no inner `Field` sits between them, and a label you wire by hand with `labelProps.htmlFor` points at the input with that `id`.\n- A user-supplied `id` is applied to the inner input (the labellable control), not the wrapper div.\n- Uses `role=\"combobox\"` with `aria-expanded`, which is true only while the list is on screen. When nothing matches, the dropdown shows the `empty` content but no list, so it stays false\n- Has `aria-haspopup=\"listbox\"` and `aria-autocomplete=\"list\"`, and, while the list is on screen, `aria-controls` pointing at it\n- Focus stays in the input, which points `aria-activedescendant` at the highlighted option as the arrow keys move it. Clicking an option leaves focus in the input too, with the picked value in it\n- The list is a `role=\"listbox\"` named through `aria-labelledby` by the label that names the input, when that label has an id: the `label` prop's label always has one, and so does a `Field`'s label that the `Field` wires itself. A `Field` label you wire by hand with `labelProps.htmlFor`, which is how a horizontal form names an Autocomplete in an inner `Field`, needs an `id` in its `labelProps` as well. Otherwise the list falls back to `aria-label=\"Suggestions\"`, or `labels.suggestions` in your language\n- The list holds only the options. The `header`, `footer` and `empty` content sit beside it in the dropdown, so a screen reader doesn't count them as options\n- When the user's typing leaves nothing that matches, the `empty` text is announced through a polite `role=\"status\"` region. That region is in the page from the start, so it's there before the message arrives. It's said once each time the matches run out, not again on every keystroke while they stay out, and the next search that comes up empty is announced too: after matches come back, after the field is emptied, or after the list closes and the user types again\n- While `loading` is on, or a `Control` with `isLoading` around the Autocomplete, the announcement waits, so the `empty` text that shows while results are on their way isn't read out. It's said once loading ends with nothing matching, for each search that comes back empty. Pass `loading` while you fetch results, as the async story in Storybook does\n- Focusing the field, opening the list with `openOnFocus` or `↓`, or emptying the field announces nothing. Without `empty`, nothing is announced at all, since there's no built-in message to say\n- `empty` is a message, so keep it to text. `Tab` closes the list, so a keyboard user can't reach a link or a button in it\n- Keep that message static, like \"No results found\". Its text is read when the matches first run out and isn't read again while they stay out, so a message that names the query, like \"No results for xyz\", is only heard for the query that ran them out\n- Dropdown items use `role=\"option\"`, and the highlighted one is `aria-selected` unless it's disabled\n- In forced colors (Windows' contrast themes), which take away the dropdown's shadow and the highlighted option's fill, the open dropdown is drawn with an edge, whether it shows options or the `empty` content, and the highlighted option with an outline in the system's highlight color\n- Disabled items have `aria-disabled
|
|
61
|
+
"accessibility": "- The `label` prop is automatically associated with the inner text input (`htmlFor` plus a generated `id`, or your own `id` if you pass one), so clicking the label focuses the input and assistive technology announces it. Inside a labeled `Field`, that `Field`'s label names the input instead when it points at it: a `Field` that is not `grouped` or `hasAddons` points it there on its own when the Autocomplete has no `id` and no inner `Field` sits between them, and a label you wire by hand with `labelProps.htmlFor` points at the input with that `id`.\n- A user-supplied `id` is applied to the inner input (the labellable control), not the wrapper div.\n- Uses `role=\"combobox\"` with `aria-expanded`, which is true only while the list is on screen. When nothing matches, the dropdown shows the `empty` content but no list, so it stays false\n- Has `aria-haspopup=\"listbox\"` and `aria-autocomplete=\"list\"`, and, while the list is on screen, `aria-controls` pointing at it\n- Focus stays in the input, which points `aria-activedescendant` at the highlighted option as the arrow keys move it. Clicking an option leaves focus in the input too, with the picked value in it\n- The list is a `role=\"listbox\"` named through `aria-labelledby` by the label that names the input, when that label has an id: the `label` prop's label always has one, and so does a `Field`'s label that the `Field` wires itself. A `Field` label you wire by hand with `labelProps.htmlFor`, which is how a horizontal form names an Autocomplete in an inner `Field`, needs an `id` in its `labelProps` as well. Otherwise the list falls back to `aria-label=\"Suggestions\"`, or `labels.suggestions` in your language\n- The list holds only the options. The `header`, `footer` and `empty` content sit beside it in the dropdown, so a screen reader doesn't count them as options\n- When the user's typing leaves nothing that matches, the `empty` text is announced through a polite `role=\"status\"` region. That region is in the page from the start, so it's there before the message arrives. It's said once each time the matches run out, not again on every keystroke while they stay out, and the next search that comes up empty is announced too: after matches come back, after the field is emptied, or after the list closes and the user types again\n- While `loading` is on, or a `Control` with `isLoading` around the Autocomplete, the announcement waits, so the `empty` text that shows while results are on their way isn't read out. It's said once loading ends with nothing matching, for each search that comes back empty. Pass `loading` while you fetch results, as the async story in Storybook does\n- Focusing the field, opening the list with `openOnFocus` or `↓`, or emptying the field announces nothing. Without `empty`, nothing is announced at all, since there's no built-in message to say\n- `empty` is a message, so keep it to text. `Tab` closes the list, so a keyboard user can't reach a link or a button in it\n- Keep that message static, like \"No results found\". Its text is read when the matches first run out and isn't read again while they stay out, so a message that names the query, like \"No results for xyz\", is only heard for the query that ran them out\n- Dropdown items use `role=\"option\"`, and the highlighted one is `aria-selected` unless it's disabled\n- In forced colors (Windows' contrast themes), which take away the dropdown's shadow and the highlighted option's fill, the open dropdown is drawn with an edge, whether it shows options or the `empty` content, and the highlighted option with an outline in the system's highlight color\n- Disabled items have `aria-disabled`. In forced colors (Windows' contrast themes), a disabled item draws in the system's color for disabled text, at full strength rather than faded, under the pointer too\n- The `clearable` clear button is a native button named \"Clear\", or `labels.clear`: `Tab` from the input reaches it, and `Enter` or `Space` clears the input and puts focus back in it\n- Full keyboard navigation support\n- The `message` describes the input through `aria-describedby`, so a screen reader reads it when the input takes focus.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the wrapper, so a screen reader hears the input is invalid when it takes focus.",
|
|
62
62
|
"related": ["Combobox", "Input", "Select", "Taginput"],
|
|
63
63
|
"storybook": "https://bestax.io/storybook/?path=/story/form-autocomplete",
|
|
64
64
|
"summary": "The `Autocomplete` component provides an input field with dropdown suggestions that filter based on user input.",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"code": "<Calendar\n aria-label=\"Choisir un jour\"\n locale=\"fr-FR\"\n firstDayOfWeek={1}\n labels={{ prevMonth: 'Mois précédent', nextMonth: 'Mois suivant' }}\n/>"
|
|
55
55
|
}
|
|
56
56
|
],
|
|
57
|
-
"accessibility": "- The root is a `<div>`. An `aria-label` or `aria-labelledby` on it names the Calendar and makes it a `role=\"group\"`, and so does a labeled `Field` around it, whose label names it when you give it no name of your own.\n- Each month is a `role=\"grid\"` named by its month and year, its weeks `role=\"row\"`s and its days `button`s with `role=\"gridcell\"`. Picked days are `aria-selected`, and today has `aria-current=\"date\"`.\n- In forced colors (Windows' contrast themes), the fill that marks a picked day, month or year, a range's band, and the year the header's year list is on, is replaced, so bestax's styles draw each of those cells, and every day of a picked range, in the system's highlight colors there, or in the system's color for a disabled control when it's disabled. What `dayTemplate` draws in them takes the same colors, unless it sets its own. While a range's end is still being picked, only its start is filled, and the day it would end on keeps its dashed edge.\n- Each day is named by its full date in the Calendar's locale, such as \"Friday, November 20, 2026\", which `getDayLabel` extends. The weekday row is hidden from assistive technology, since every day's name carries its weekday, so moving down a week reads the whole date rather than \"27\". On a server-rendered page the full names arrive once the page hydrates.\n- What `dayTemplate` draws isn't read, since a day's name is its date: pair it with `getDayLabel`.\n- A range's ends are described as \"Start date\" and \"End date\", the day a pending range would end on as \"Choose as end date\", and a polite live region states the range in words as it's picked, as on `DateRangeInput`.\n- `readOnly` puts `aria-readonly=\"true\"` on the grids and keeps the tab stop and the keys. `disabled` puts `aria-disabled=\"true\"` on them and disables every button.\n- `loading` puts `aria-busy=\"true\"` on the grids and keeps the grid and its focus where they were.\n- A roving `tabindex` keeps one day focusable in the whole Calendar, whatever `monthsToShow` is. When the focused day is disabled, the tab stop moves to the nearest enabled day of the months on show.\n- Closing the year list, with a pick or `Escape`, puts focus back on the grid's tab stop.\n- On a right-to-left page the previous-month chevron points right.",
|
|
57
|
+
"accessibility": "- The root is a `<div>`. An `aria-label` or `aria-labelledby` on it names the Calendar and makes it a `role=\"group\"`, and so does a labeled `Field` around it, whose label names it when you give it no name of your own.\n- Each month is a `role=\"grid\"` named by its month and year, its weeks `role=\"row\"`s and its days `button`s with `role=\"gridcell\"`. Picked days are `aria-selected`, and today has `aria-current=\"date\"`.\n- In forced colors (Windows' contrast themes), the fill that marks a picked day, month or year, a range's band, and the year the header's year list is on, is replaced, so bestax's styles draw each of those cells, and every day of a picked range, in the system's highlight colors there, or in the system's color for a disabled control when it's disabled. What `dayTemplate` draws in them takes the same colors, unless it sets its own. While a range's end is still being picked, only its start is filled, and the day it would end on keeps its dashed edge.\n- In forced colors, a disabled day, month or year, and a disabled month or arrow button in the header, draws in the system's color for a disabled control, at full strength rather than faded.\n- Each day is named by its full date in the Calendar's locale, such as \"Friday, November 20, 2026\", which `getDayLabel` extends. The weekday row is hidden from assistive technology, since every day's name carries its weekday, so moving down a week reads the whole date rather than \"27\". On a server-rendered page the full names arrive once the page hydrates.\n- What `dayTemplate` draws isn't read, since a day's name is its date: pair it with `getDayLabel`.\n- A range's ends are described as \"Start date\" and \"End date\", the day a pending range would end on as \"Choose as end date\", and a polite live region states the range in words as it's picked, as on `DateRangeInput`.\n- `readOnly` puts `aria-readonly=\"true\"` on the grids and keeps the tab stop and the keys. `disabled` puts `aria-disabled=\"true\"` on them and disables every button.\n- `loading` puts `aria-busy=\"true\"` on the grids and keeps the grid and its focus where they were.\n- A roving `tabindex` keeps one day focusable in the whole Calendar, whatever `monthsToShow` is. When the focused day is disabled, the tab stop moves to the nearest enabled day of the months on show.\n- Closing the year list, with a pick or `Escape`, puts focus back on the grid's tab stop.\n- On a right-to-left page the previous-month chevron points right.",
|
|
58
58
|
"related": ["DateInput", "DateRangeInput", "Fieldset"],
|
|
59
59
|
"storybook": "https://bestax.io/storybook/?path=/story/form-calendar",
|
|
60
60
|
"summary": "The `Calendar` component shows months on the page, not behind an input, where a click picks a day or a range and each day can show what's on it. It's the grid the date pickers draw, with no `Field`, label or hidden input: a form that posts a date uses `DateInput inline` instead.",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"code": "<Carousel ariaLabel=\"Slides without repeat\" repeat={false}>\n <CarouselItem>\n <Hero color=\"danger\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">First (no previous)</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"warning\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph>Middle slide</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Last (no next)</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
75
75
|
}
|
|
76
76
|
],
|
|
77
|
-
"accessibility": "- Uses `role=\"region\"` with `aria-roledescription=\"carousel\"`\n- Name each carousel for what it shows with `ariaLabel`, such as \"Featured products\", and leave the word \"carousel\" out of it, since the role description already says it. Under a visible heading, pass `aria-labelledby` with the heading's id instead, which names it ahead of the `aria-label` the default still sets. The default, \"Image carousel\", is a placeholder: with the role description it says \"carousel\" twice, and every carousel left with it has the same name\n- Each item is a `group` with `aria-roledescription=\"slide\"`, named for its place, such as \"2 of 6\". An item's own `aria-label` or `aria-labelledby` takes the place of that name\n- Items out of view are `aria-hidden` and `inert`, so screen readers skip them and nothing in them takes focus. With several in view, every item in view is exposed. The copies a loop adds at each end of the track follow the same rule, so where the view runs past the last item, the copies on screen are the ones exposed\n- The track is a polite live region, so what comes into view is announced, except while autoplay is moving it (`aria-live=\"off\"`)\n- Autoplay waits while the pointer is over the carousel (with `pauseOnHover`) and while focus is anywhere inside it, on an item, an arrow or an indicator, so nothing moves while someone reads or works it. A browser that leaves focus on an arrow or an indicator a click pressed keeps it waiting until focus moves on. It's a pause, not a stop: once the pointer and focus leave, autoplay goes on\n- When the system asks for reduced motion, each step changes the view at once, with no slide, and a step past either end with `repeat` goes straight to the other end. The arrows and indicators change without a transition too. A drag still follows the pointer, since that's the user's own movement\n- When something else takes the item holding focus out of view (a swipe, a change of width that changes the count, a new controlled `value`, or the item's removal), focus moves to the first item in view rather than dropping to the page\n- Navigation arrows have `aria-label` for screen readers\n- The arrows', the indicators' and the items' names are English unless `labels` gives the words in the page's language, and the role descriptions take `aria-roledescription` on the `Carousel` and on each `CarouselItem`\n- With `arrowBackground={false}`, an arrow with keyboard focus shows Bulma's focus outline, as a ghost `Button` does, in the overlay look too. With `arrowHover`, an arrow shows while keyboard focus is on it\n- Indicators use `role=\"tablist\"` and `role=\"tab\"` semantics, one for each position a step can land on\n- The indicators take Bulma's look: a resting dot, line or bar is filled in the border color and the current one in the primary color, and a circle is a ring in the border color, filled when current. A resting one falls short of the 3:1 against the page that WCAG asks of a graphic. For that, set `--bulma-carousel-indicator-border-color` to a color such as `var(--bulma-text-weak)` on a class you pass through `className`, with the carousel's class in the selector (`.carousel.my-carousel`, `.bestax-carousel.my-carousel` under the prefixed flavor) so it wins whatever order the stylesheets load in. It draws a ring at each resting indicator's edge, circles included, and leaves the current one, and the dots, lines and bars in the overlay look, as they are. Forced colors (Windows' contrast themes) replaces the fills, so there each indicator shows its ring in the buttons' text color and the current one is filled in it.\n- The Left and Right arrow keys move the carousel while focus is on its arrows or indicators, unless Alt, Ctrl or Meta is held, which leaves them to the browser. Inside an item they're left to the item's content, such as a field or a slider. On an indicator they move focus to the indicator beside it and bring its slide into view, as a click on it does\n- Previous/Next buttons are disabled at the ends when not repeating. When the one holding focus is disabled, focus moves to the current indicator, or to the other arrow when there are no indicators. When a focused arrow or indicator goes away, as an indicator does when a change of width leaves fewer positions, focus moves to the current indicator, an arrow that works, or the first item in view, rather than dropping to the page\n- On a right-to-left page the slides run from right to left. The previous arrow sits on the right, at the start of the line, and the next arrow on the left, and the built-in chevrons flip to match. An `iconPrev` or `iconNext` is drawn as you give it. <kbd>ArrowLeft</kbd> and a swipe to the right go to the next slide, the way the track moves.",
|
|
77
|
+
"accessibility": "- Uses `role=\"region\"` with `aria-roledescription=\"carousel\"`\n- Name each carousel for what it shows with `ariaLabel`, such as \"Featured products\", and leave the word \"carousel\" out of it, since the role description already says it. Under a visible heading, pass `aria-labelledby` with the heading's id instead, which names it ahead of the `aria-label` the default still sets. The default, \"Image carousel\", is a placeholder: with the role description it says \"carousel\" twice, and every carousel left with it has the same name\n- Each item is a `group` with `aria-roledescription=\"slide\"`, named for its place, such as \"2 of 6\". An item's own `aria-label` or `aria-labelledby` takes the place of that name\n- Items out of view are `aria-hidden` and `inert`, so screen readers skip them and nothing in them takes focus. With several in view, every item in view is exposed. The copies a loop adds at each end of the track follow the same rule, so where the view runs past the last item, the copies on screen are the ones exposed\n- The track is a polite live region, so what comes into view is announced, except while autoplay is moving it (`aria-live=\"off\"`)\n- Autoplay waits while the pointer is over the carousel (with `pauseOnHover`) and while focus is anywhere inside it, on an item, an arrow or an indicator, so nothing moves while someone reads or works it. A browser that leaves focus on an arrow or an indicator a click pressed keeps it waiting until focus moves on. It's a pause, not a stop: once the pointer and focus leave, autoplay goes on\n- When the system asks for reduced motion, each step changes the view at once, with no slide, and a step past either end with `repeat` goes straight to the other end. The arrows and indicators change without a transition too. A drag still follows the pointer, since that's the user's own movement\n- When something else takes the item holding focus out of view (a swipe, a change of width that changes the count, a new controlled `value`, or the item's removal), focus moves to the first item in view rather than dropping to the page\n- Navigation arrows have `aria-label` for screen readers\n- The arrows', the indicators' and the items' names are English unless `labels` gives the words in the page's language, and the role descriptions take `aria-roledescription` on the `Carousel` and on each `CarouselItem`\n- With `arrowBackground={false}`, an arrow with keyboard focus shows Bulma's focus outline, as a ghost `Button` does, in the overlay look too. With `arrowHover`, an arrow shows while keyboard focus is on it\n- Indicators use `role=\"tablist\"` and `role=\"tab\"` semantics, one for each position a step can land on\n- The indicators take Bulma's look: a resting dot, line or bar is filled in the border color and the current one in the primary color, and a circle is a ring in the border color, filled when current. A resting one falls short of the 3:1 against the page that WCAG asks of a graphic. For that, set `--bulma-carousel-indicator-border-color` to a color such as `var(--bulma-text-weak)` on a class you pass through `className`, with the carousel's class in the selector (`.carousel.my-carousel`, `.bestax-carousel.my-carousel` under the prefixed flavor) so it wins whatever order the stylesheets load in. It draws a ring at each resting indicator's edge, circles included, and leaves the current one, and the dots, lines and bars in the overlay look, as they are. Forced colors (Windows' contrast themes) replaces the fills, so there each indicator shows its ring in the buttons' text color and the current one is filled in it.\n- The Left and Right arrow keys move the carousel while focus is on its arrows or indicators, unless Alt, Ctrl or Meta is held, which leaves them to the browser. Inside an item they're left to the item's content, such as a field or a slider. On an indicator they move focus to the indicator beside it and bring its slide into view, as a click on it does\n- Previous/Next buttons are disabled at the ends when not repeating. When the one holding focus is disabled, focus moves to the current indicator, or to the other arrow when there are no indicators. When a focused arrow or indicator goes away, as an indicator does when a change of width leaves fewer positions, focus moves to the current indicator, an arrow that works, or the first item in view, rather than dropping to the page\n- In forced colors (Windows' contrast themes), a disabled arrow draws in the system's color for a disabled control, at full strength rather than faded, without `arrowHover`\n- On a right-to-left page the slides run from right to left. The previous arrow sits on the right, at the start of the line, and the next arrow on the left, and the built-in chevrons flip to match. An `iconPrev` or `iconNext` is drawn as you give it. <kbd>ArrowLeft</kbd> and a swipe to the right go to the next slide, the way the track moves.",
|
|
78
78
|
"related": ["Modal", "Tabs"],
|
|
79
79
|
"storybook": "https://bestax.io/storybook/?path=/story/components-carousel",
|
|
80
80
|
"summary": "The `Carousel` component provides an image/content slider with navigation arrows and indicators.",
|
|
@@ -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.\n- A panel that would run past the left or right edge of the screen, as on a phone with the\n field mid-row, keeps its corner and moves sideways just far enough to fit, or, wider than\n the screen, to the edge its text starts from.\n- The `message` describes the text input through `aria-describedby`, after any ids you pass there, so a screen reader reads it when the input takes focus.",
|
|
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. A\n disabled launcher draws in the system's color for a disabled control, at full strength rather\n than faded. A disabled swatch stays faded, since its color is the value it shows.\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.\n- The `message` describes the text input through `aria-describedby`, after any ids you pass there, so a screen reader reads it when the input takes focus.",
|
|
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.",
|
|
@@ -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- An `inline` picker has no input for its `label` to name, so its root is a `role=\"group\"` the `label` names through `aria-labelledby` and its `message` describes. A labeled `Field` around it names it the same way, unless the `Field` is `grouped` or `hasAddons`, or a label is wired by hand with `labelProps.htmlFor`. An `aria-label` or `aria-labelledby` you give it names it instead. With no name it stays a plain `div`, and its grid or year list inside keep their own names.\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- In forced colors (Windows' contrast themes), the fill that marks the selected day, month or year, and the year the header's year list is on, is replaced, so bestax's styles draw it in the system's highlight colors there, or in the system's color for a disabled control when it's disabled.\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.\n- The `message` describes the input through `aria-describedby`, so a screen reader reads it when the input takes focus. Ids you pass in `aria-describedby` go on the container with the other attributes, except on a phone's native input, which lists them first. An `inline` picker has no input, so there the message describes the picker's group, when something names it.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the container, so a screen reader hears the input is invalid when it takes focus. An `inline` picker has no input, and they stay on its container.\n- The input takes its name from `label`, from a labeled `Field` that isn't `grouped` or `hasAddons` around a `DateInputBase` with no `id` of its own, or from a `<label htmlFor>` of your own pointing at the `id` you give it. `aria-label` and `aria-labelledby` go on the container with the other attributes you pass, so they don't name the input, except on the native input `mobileNative` renders, which takes them itself. An `inline` picker has no input to name.\n- A date of birth takes `autoComplete=\"bday\"`, which goes on the field, so the browser and assistive technology know what it asks for (WCAG 1.3.5). Without a token the text field turns autocomplete off, since the browser's own suggestions would cover the calendar. A date that autofill writes commits when it reads in the token `format` (the default one when `format` is `Intl` options) or through your `parse`. One it can't read, or that `min`, `max` or a blocked day rules out, isn't committed, as with typing: the field shows it as written, and submits it under a `name`, until focus next leaves the field.",
|
|
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- An `inline` picker has no input for its `label` to name, so its root is a `role=\"group\"` the `label` names through `aria-labelledby` and its `message` describes. A labeled `Field` around it names it the same way, unless the `Field` is `grouped` or `hasAddons`, or a label is wired by hand with `labelProps.htmlFor`. An `aria-label` or `aria-labelledby` you give it names it instead. With no name it stays a plain `div`, and its grid or year list inside keep their own names.\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- In forced colors (Windows' contrast themes), the fill that marks the selected day, month or year, and the year the header's year list is on, is replaced, so bestax's styles draw it in the system's highlight colors there, or in the system's color for a disabled control when it's disabled.\n- In forced colors, a disabled day, month or year, a disabled month or arrow button in the header, and a disabled launcher draw in the system's color for a disabled control, at full strength rather than faded.\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.\n- The `message` describes the input through `aria-describedby`, so a screen reader reads it when the input takes focus. Ids you pass in `aria-describedby` go on the container with the other attributes, except on a phone's native input, which lists them first. An `inline` picker has no input, so there the message describes the picker's group, when something names it.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the container, so a screen reader hears the input is invalid when it takes focus. An `inline` picker has no input, and they stay on its container.\n- The input takes its name from `label`, from a labeled `Field` that isn't `grouped` or `hasAddons` around a `DateInputBase` with no `id` of its own, or from a `<label htmlFor>` of your own pointing at the `id` you give it. `aria-label` and `aria-labelledby` go on the container with the other attributes you pass, so they don't name the input, except on the native input `mobileNative` renders, which takes them itself. An `inline` picker has no input to name.\n- A date of birth takes `autoComplete=\"bday\"`, which goes on the field, so the browser and assistive technology know what it asks for (WCAG 1.3.5). Without a token the text field turns autocomplete off, since the browser's own suggestions would cover the calendar. A date that autofill writes commits when it reads in the token `format` (the default one when `format` is `Intl` options) or through your `parse`. One it can't read, or that `min`, `max` or a blocked day rules out, isn't committed, as with typing: the field shows it as written, and submits it under a `name`, until focus next leaves the field.",
|
|
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.",
|
|
@@ -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- `aria-invalid` and `aria-errormessage` go on both inputs, marking the range as a whole, while the other attributes you pass go on the group, so a screen reader hears an input is invalid when it takes focus. An `inline` picker has no input, and they stay on its group.\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- In forced colors (Windows' contrast themes), the fill and the band that mark the range are replaced, so bestax's styles draw every day of a picked range, both ends included, and the year the header's year list is on, in the system's highlight colors there, or in the system's color for a disabled control when it's disabled. While the end is still being picked, only the start is filled, and the day the range would end on keeps its dashed edge.\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.\n- The `message` describes the group through `aria-describedby`, after any ids you pass there, as the label names it.",
|
|
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- `aria-invalid` and `aria-errormessage` go on both inputs, marking the range as a whole, while the other attributes you pass go on the group, so a screen reader hears an input is invalid when it takes focus. An `inline` picker has no input, and they stay on its group.\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- In forced colors (Windows' contrast themes), the fill and the band that mark the range are replaced, so bestax's styles draw every day of a picked range, both ends included, and the year the header's year list is on, in the system's highlight colors there, or in the system's color for a disabled control when it's disabled. While the end is still being picked, only the start is filled, and the day the range would end on keeps its dashed edge.\n- In forced colors, a disabled day, month or year, a disabled month or arrow button in the header, and a disabled launcher draw in the system's color for a disabled control, at full strength rather than faded.\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.\n- The `message` describes the group through `aria-describedby`, after any ids you pass there, as the label names it.",
|
|
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.",
|
|
@@ -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- An `inline` picker has no input for its `label` to name, so its root is a `role=\"group\"` the `label` names through `aria-labelledby` and its `message` describes. A labeled `Field` around it names it the same way, unless the `Field` is `grouped` or `hasAddons`, or a label is wired by hand with `labelProps.htmlFor`. An `aria-label` or `aria-labelledby` you give it names it instead. With no name it stays a plain `div`, and its grid and its wheels inside keep their own names.\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- In forced colors (Windows' contrast themes), the fill that marks the selected day, and the year the header's year list is on, is replaced, so bestax's styles draw it in the system's highlight colors there, or in the system's color for a disabled control when it's disabled.\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- In forced colors (Windows' contrast themes), the time wheels' band is drawn in the system's highlight color, since its fill is replaced there, and the values keep the system's text color.\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.\n- The `message` describes the input through `aria-describedby`, so a screen reader reads it when the input takes focus. Ids you pass in `aria-describedby` go on the container with the other attributes, except on a phone's native input, which lists them first. An `inline` picker has no input, so there the message describes the picker's group, when something names it.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the container, so a screen reader hears the input is invalid when it takes focus. An `inline` picker has no input, and they stay on its container.\n- The input takes its name from `label`, from a labeled `Field` that isn't `grouped` or `hasAddons` around a `DateTimeInputBase` with no `id` of its own, or from a `<label htmlFor>` of your own pointing at the `id` you give it. `aria-label` and `aria-labelledby` go on the container with the other attributes you pass, so they don't name the input, except on the native input `mobileNative` renders, which takes them itself. An `inline` picker has no input to name.\n- An `autoComplete` you give goes on the field. Without one the text field turns autocomplete off, since the browser's own suggestions would cover the panel. A date and time that autofill writes commits when it reads in the token `format` (the default one when `format` is `Intl` options) or through your `parse`. One it can't read, or that `min`, `max` or a blocked day or time rules out, isn't committed, as with typing: the field shows it as written, and submits it under a `name`, until focus next leaves the field.",
|
|
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- An `inline` picker has no input for its `label` to name, so its root is a `role=\"group\"` the `label` names through `aria-labelledby` and its `message` describes. A labeled `Field` around it names it the same way, unless the `Field` is `grouped` or `hasAddons`, or a label is wired by hand with `labelProps.htmlFor`. An `aria-label` or `aria-labelledby` you give it names it instead. With no name it stays a plain `div`, and its grid and its wheels inside keep their own names.\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- In forced colors (Windows' contrast themes), the fill that marks the selected day, and the year the header's year list is on, is replaced, so bestax's styles draw it in the system's highlight colors there, or in the system's color for a disabled control when it's disabled.\n- In forced colors, a disabled day, month or year, a disabled month or arrow button in the header, a disabled Time, Reset or ✓ button in the footer, and a disabled launcher draw in the system's color for a disabled control, at full strength rather than faded.\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- In forced colors (Windows' contrast themes), the time wheels' band is drawn in the system's highlight color, since its fill is replaced there, and the values keep the system's text color.\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.\n- The `message` describes the input through `aria-describedby`, so a screen reader reads it when the input takes focus. Ids you pass in `aria-describedby` go on the container with the other attributes, except on a phone's native input, which lists them first. An `inline` picker has no input, so there the message describes the picker's group, when something names it.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the container, so a screen reader hears the input is invalid when it takes focus. An `inline` picker has no input, and they stay on its container.\n- The input takes its name from `label`, from a labeled `Field` that isn't `grouped` or `hasAddons` around a `DateTimeInputBase` with no `id` of its own, or from a `<label htmlFor>` of your own pointing at the `id` you give it. `aria-label` and `aria-labelledby` go on the container with the other attributes you pass, so they don't name the input, except on the native input `mobileNative` renders, which takes them itself. An `inline` picker has no input to name.\n- An `autoComplete` you give goes on the field. Without one the text field turns autocomplete off, since the browser's own suggestions would cover the panel. A date and time that autofill writes commits when it reads in the token `format` (the default one when `format` is `Intl` options) or through your `parse`. One it can't read, or that `min`, `max` or a blocked day or time rules out, isn't committed, as with typing: the field shows it as written, and submits it under a `name`, until focus next leaves the field.",
|
|
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.",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"code": "<Dropzone label=\"Attachments\" disabled hint=\"Uploads are closed\" />"
|
|
55
55
|
}
|
|
56
56
|
],
|
|
57
|
-
"accessibility": "- **One control:** the native file input, the zone's one tab stop, named by the zone's text and\n by a `label` through `htmlFor`. The browser reports its state itself (\"No file chosen\", \"2\n files\"), in its own language.\n- **Not drag only:** a click on the zone, or Enter or Space on the input, opens the picker, so\n dropping is never the only way to choose a file (WCAG 2.5.7 and 2.1.1). Dropping needs a pointer\n and a desktop; on phones the picker is the way in.\n- **Descriptions:** the input's `aria-describedby` points at the `hint`, at the refusals while\n there are any, and at the Field `message`, after any ids you pass.\n- **Announcements:** additions (\"report.pdf added\", \"2 files added\"), refusals and removals are\n announced politely through a status region, since a screen reader can't see the list change.\n Nothing is announced while a file is dragged over the zone.\n- **The list:** a `<ul>` with a row per file, each with a real remove button named \"Remove\" and\n the file's name. After a removal, focus moves to the next row's button, the one before, or the\n input. The `<ul>` writes out `role=\"list\"`, its implicit role, which Safari drops once a list's\n bullets are hidden, as Bulma's reset hides them; without it VoiceOver reads the files with no\n count.\n- **Drag states:** the zone's dashed border turns solid while files are dragged over it, so the\n state shows without color, and in forced colors too. Only the files' types can be read during a\n drag, so the refused look shows only when `accept` names no extension and every type is one it\n refuses; the drop's result is what counts.\n- **Forced colors:** the drop target's border takes the system highlight color, and the remove\n buttons keep their circle and cross in the system's button colors, which Bulma's delete button\n otherwise loses there.\n- **No ARIA drag attributes:** `aria-dropeffect` and `aria-grabbed` are deprecated, and nothing\n overrides the input's role.",
|
|
57
|
+
"accessibility": "- **One control:** the native file input, the zone's one tab stop, named by the zone's text and\n by a `label` through `htmlFor`. The browser reports its state itself (\"No file chosen\", \"2\n files\"), in its own language.\n- **Not drag only:** a click on the zone, or Enter or Space on the input, opens the picker, so\n dropping is never the only way to choose a file (WCAG 2.5.7 and 2.1.1). Dropping needs a pointer\n and a desktop; on phones the picker is the way in.\n- **Descriptions:** the input's `aria-describedby` points at the `hint`, at the refusals while\n there are any, and at the Field `message`, after any ids you pass.\n- **Announcements:** additions (\"report.pdf added\", \"2 files added\"), refusals and removals are\n announced politely through a status region, since a screen reader can't see the list change.\n Nothing is announced while a file is dragged over the zone.\n- **The list:** a `<ul>` with a row per file, each with a real remove button named \"Remove\" and\n the file's name. After a removal, focus moves to the next row's button, the one before, or the\n input. The `<ul>` writes out `role=\"list\"`, its implicit role, which Safari drops once a list's\n bullets are hidden, as Bulma's reset hides them; without it VoiceOver reads the files with no\n count.\n- **Drag states:** the zone's dashed border turns solid while files are dragged over it, so the\n state shows without color, and in forced colors too. Only the files' types can be read during a\n drag, so the refused look shows only when `accept` names no extension and every type is one it\n refuses; the drop's result is what counts.\n- **Forced colors:** the drop target's border takes the system highlight color, and the remove\n buttons keep their circle and cross in the system's button colors, which Bulma's delete button\n otherwise loses there. A disabled zone draws its border and text in the system's color for a\n disabled control, at full strength rather than faded.\n- **No ARIA drag attributes:** `aria-dropeffect` and `aria-grabbed` are deprecated, and nothing\n overrides the input's role.",
|
|
58
58
|
"related": ["Field", "Fieldset", "File", "Progress", "useBulmaClasses"],
|
|
59
59
|
"storybook": "https://bestax.io/storybook/?path=/story/form-dropzone--default",
|
|
60
60
|
"summary": "The `Dropzone` component is an area to drop files on or click to pick them, which checks each file and lists the chosen ones with a way to remove each. It's Bulma's boxed, full-width file widget with the real `<input type=\"file\">` lying over it, so the input is the one tab stop, the click target and the drop target, and Enter and Space open the picker. The input holds the chosen files: a pick, drop or paste that passes the checks is written to it, so a form submits the files under `name`. It doesn't upload anything.",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"code": "<Lightbox\n items={[\n {\n src: '/img/carousel/carousel-banner-1.jpg',\n alt: 'Vibrant galaxy with purple and gold tones',\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n },\n ]}\n>\n <Buttons>\n <LightboxTrigger as={Button} index={0}>\n LightboxTrigger\n </LightboxTrigger>\n <Lightbox.Trigger as={Button} index={1}>\n Lightbox.Trigger\n </Lightbox.Trigger>\n </Buttons>\n</Lightbox>"
|
|
43
43
|
}
|
|
44
44
|
],
|
|
45
|
-
"accessibility": "- **A modal dialog:** the viewer is a `Modal` with `role=\"dialog\"` and `aria-modal`, named by\n `ariaLabel` (\"Image viewer\" by default) rather than by the image's alt, which changes with every\n image. Focus moves to the close button when it opens, Tab stays inside, Escape closes it when\n it's the topmost overlay, and focus goes back to the trigger, or to whatever had it when `open`\n was set.\n- **Real triggers:** each `Lightbox.Trigger` is a `<button type=\"button\" aria-haspopup=\"dialog\">`,\n or the button `Button` renders with `as={Button}`, named by its content. So the thumbnail's `alt`\n is the button's name, as long as it isn't inside a `<figure>` (give a ratio `Image` `as=\"div\"`).\n- **Every image has an alt:** `alt` is required in the type, a development build warns once for an\n item without one, and the caption is the `<figure>`'s `<figcaption>`, which names it.\n- **Moves are announced:** after the viewer opens and after each move, a polite status line says\n \"Image 3 of 10: Harbour at dusk\", from `labels.progress` and the image's alt. The visible counter\n is hidden from screen readers, so it isn't read twice. For an image that fails to load, the line\n starts with `labels.loadError`: \"This image didn't load. Image 3 of 10: Harbour at dusk\", and a\n Retry that fails again is announced again.\n- **At the ends:** with `repeat={false}`, the previous or next button is `aria-disabled` but stays in\n the tab order, so focus isn't dropped when it stops working. The zoom buttons do the same at their\n limits.\n- **Single-pointer alternatives:** pinch has the zoom buttons and a double click or tap. Panning a\n zoomed image is a drag, so zoom-out and reset are always one press away, and the arrow keys pan.\n- **Right to left:** the arrows, the keys and swipes follow the reading direction, so the next\n image is always the way the next arrow points.\n- **Contrast:** the counter, the caption and the buttons' icons are white on Bulma's near-black\n modal background in both schemes, well over the 4.5:1 WCAG asks of text.\n- **Forced colors:** the buttons draw their borders in the system's colors and the focus ring\n shows.\n- **Motion:** the open fade, the crossfade between images and the zoom transition stop under\n `prefers-reduced-motion: reduce`.",
|
|
45
|
+
"accessibility": "- **A modal dialog:** the viewer is a `Modal` with `role=\"dialog\"` and `aria-modal`, named by\n `ariaLabel` (\"Image viewer\" by default) rather than by the image's alt, which changes with every\n image. Focus moves to the close button when it opens, Tab stays inside, Escape closes it when\n it's the topmost overlay, and focus goes back to the trigger, or to whatever had it when `open`\n was set.\n- **Real triggers:** each `Lightbox.Trigger` is a `<button type=\"button\" aria-haspopup=\"dialog\">`,\n or the button `Button` renders with `as={Button}`, named by its content. So the thumbnail's `alt`\n is the button's name, as long as it isn't inside a `<figure>` (give a ratio `Image` `as=\"div\"`).\n- **Every image has an alt:** `alt` is required in the type, a development build warns once for an\n item without one, and the caption is the `<figure>`'s `<figcaption>`, which names it.\n- **Moves are announced:** after the viewer opens and after each move, a polite status line says\n \"Image 3 of 10: Harbour at dusk\", from `labels.progress` and the image's alt. The visible counter\n is hidden from screen readers, so it isn't read twice. For an image that fails to load, the line\n starts with `labels.loadError`: \"This image didn't load. Image 3 of 10: Harbour at dusk\", and a\n Retry that fails again is announced again.\n- **At the ends:** with `repeat={false}`, the previous or next button is `aria-disabled` but stays in\n the tab order, so focus isn't dropped when it stops working. The zoom buttons do the same at their\n limits.\n- **Single-pointer alternatives:** pinch has the zoom buttons and a double click or tap. Panning a\n zoomed image is a drag, so zoom-out and reset are always one press away, and the arrow keys pan.\n- **Right to left:** the arrows, the keys and swipes follow the reading direction, so the next\n image is always the way the next arrow points.\n- **Contrast:** the counter, the caption and the buttons' icons are white on Bulma's near-black\n modal background in both schemes, well over the 4.5:1 WCAG asks of text.\n- **Forced colors:** the buttons draw their borders in the system's colors and the focus ring\n shows. A button that does nothing at an end or a zoom limit draws in the system's color for a\n disabled control, at full strength rather than faded.\n- **Motion:** the open fade, the crossfade between images and the zoom transition stop under\n `prefers-reduced-motion: reduce`.",
|
|
46
46
|
"related": ["Carousel", "Figure", "Image", "Modal", "useBulmaClasses"],
|
|
47
47
|
"storybook": "https://bestax.io/storybook/?path=/story/components-lightbox--default",
|
|
48
48
|
"summary": "The `Lightbox` component shows a set of images one at a time in a modal viewer, with previous and next, a counter, captions and zoom, opened from the `Lightbox.Trigger` buttons you place. It renders its children where it stands, with no wrapper, and the viewer only while it's open, into a portal by default. The viewer is a `Modal`: focus moves to its close button, Tab stays inside, Escape and a click on the background close it, and focus goes back to the trigger.",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"code": "function example() {\n return (\n <Field\n horizontal\n label=\"Quantity\"\n labelProps={{ htmlFor: 'quantity-field-control' }}\n >\n <Field.Body>\n <Field>\n <Control>\n <Numberinput\n id=\"quantity-field-control\"\n defaultValue={1}\n min={1}\n max={10}\n color=\"primary\"\n />\n </Control>\n </Field>\n </Field.Body>\n </Field>\n );\n}"
|
|
59
59
|
}
|
|
60
60
|
],
|
|
61
|
-
"accessibility": "- Uses native number input element\n- The `label` prop, or the label of a `Field` the Numberinput sits in, names its input. A `Field` with `hasAddons` or `grouped` holds several controls and names none, so wire that one with `labelProps={{ htmlFor }}` and a matching `id`.\n- Has `aria-valuenow`, `aria-valuemin`, and `aria-valuemax` attributes, with `aria-valuenow` left off while the field holds no number, or a number outside `min` and `max` that's still being typed\n- The increase and decrease buttons are named \"Increase value\" and \"Decrease value\", in both variants, and `labels` names them in the page's language\n- Arrow keys increment/decrement the value\n- With `editable={false}` the input is read-only, so nothing can be typed in, but the arrow keys and the buttons still change the value. A screen reader announces the field as read-only all the same, so say that the buttons set it in its label, or in its `message` where it renders one\n- While you edit, the field can be empty, hold a lone `-` on the way to a negative number, or hold a number outside `min` and `max` on the way to one inside them, such as the `2` of `25` when `min` is 10. `onChange` waits for a number in range. Enter or leaving the field clamps a number outside them and reports it, or puts the last value back when the field holds no number. From a number outside them, a step toward them lands on the nearer one and a step away does nothing, and with no number a step starts from the last value\n- The +/- buttons stay out of the Tab order, and a press on one leaves focus where it was, in the input when it had it, so the arrow keys keep working after a click and a button that disables at `min` or `max` doesn't take focus with it. A press on a button that's already disabled reaches nothing, as a press on any text does, so focus leaves the input then\n- Buttons are disabled at min/max boundaries, and while the field holds a number typed outside them, the one that would step further out is disabled\n- The `message` describes the number input through `aria-describedby`, after any ids you pass there, so a screen reader reads it when the input takes focus.",
|
|
61
|
+
"accessibility": "- Uses native number input element\n- The `label` prop, or the label of a `Field` the Numberinput sits in, names its input. A `Field` with `hasAddons` or `grouped` holds several controls and names none, so wire that one with `labelProps={{ htmlFor }}` and a matching `id`.\n- Has `aria-valuenow`, `aria-valuemin`, and `aria-valuemax` attributes, with `aria-valuenow` left off while the field holds no number, or a number outside `min` and `max` that's still being typed\n- The increase and decrease buttons are named \"Increase value\" and \"Decrease value\", in both variants, and `labels` names them in the page's language\n- Arrow keys increment/decrement the value\n- With `editable={false}` the input is read-only, so nothing can be typed in, but the arrow keys and the buttons still change the value. A screen reader announces the field as read-only all the same, so say that the buttons set it in its label, or in its `message` where it renders one\n- While you edit, the field can be empty, hold a lone `-` on the way to a negative number, or hold a number outside `min` and `max` on the way to one inside them, such as the `2` of `25` when `min` is 10. `onChange` waits for a number in range. Enter or leaving the field clamps a number outside them and reports it, or puts the last value back when the field holds no number. From a number outside them, a step toward them lands on the nearer one and a step away does nothing, and with no number a step starts from the last value\n- The +/- buttons stay out of the Tab order, and a press on one leaves focus where it was, in the input when it had it, so the arrow keys keep working after a click and a button that disables at `min` or `max` doesn't take focus with it. A press on a button that's already disabled reaches nothing, as a press on any text does, so focus leaves the input then\n- Buttons are disabled at min/max boundaries, and while the field holds a number typed outside them, the one that would step further out is disabled\n- In forced colors (Windows' contrast themes), a disabled Numberinput isn't faded as a whole, and in the stepper variant those disabled buttons draw at full strength in the system's color for a disabled control.\n- The `message` describes the number input through `aria-describedby`, after any ids you pass there, so a screen reader reads it when the input takes focus.",
|
|
62
62
|
"related": ["Input", "Slider"],
|
|
63
63
|
"storybook": "https://bestax.io/storybook/?path=/story/form-numberinput",
|
|
64
64
|
"summary": "The `Numberinput` component provides a number input with increment/decrement buttons.",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"code": "function example() {\n return (\n <Field\n horizontal\n label=\"Volume\"\n labelProps={{ htmlFor: 'volume-field-control' }}\n >\n <Field.Body>\n <Field>\n <Control iconLeftName=\"volume-up\">\n <Slider\n id=\"volume-field-control\"\n defaultValue={50}\n color=\"primary\"\n />\n </Control>\n </Field>\n </Field.Body>\n </Field>\n );\n}"
|
|
59
59
|
}
|
|
60
60
|
],
|
|
61
|
-
"accessibility": "- Uses native `<input type=\"range\">` element\n- The `label` prop, or the label of a `Field` the slider sits in, names its input.\n- In range mode the label starts each thumb's name, so `<Slider range label=\"Price range\" />` announces \"Price range Minimum value\" and \"Price range Maximum value\". Each thumb points `aria-labelledby` at the label and at a hidden span holding its own text, because an `aria-label` would outrank the label. The label's `for` still lands on the low thumb, so clicking the label focuses it.\n- `ariaLabel` wins over the label. In range mode each entry is that thumb's whole name, with no label in front, and an empty entry counts as unset.\n- An `aria-label` or `aria-labelledby` you pass straight to a range Slider names the whole Slider, so it takes the label's place at the start of both thumbs' names: `<Slider range aria-label=\"Budget\" />` announces \"Budget Minimum value\" and \"Budget Maximum value\". An `ariaLabel` entry still wins for its own thumb. To keep a label out of the thumbs' names altogether, pass `aria-labelledby={undefined}`, and they stay \"Minimum value\" and \"Maximum value\".\n- A `Field` label you wire by hand with `labelProps={{ htmlFor }}`, as in a horizontal form, gets no generated id, so give it one of your own there as well, as in `labelProps={{ htmlFor: 'price', id: 'price-label' }}`, and it starts both thumbs' names the same way. Without that `id` it reaches a range Slider only through its `for`, which the thumbs' default `aria-label` outranks, so they stay \"Minimum value\" and \"Maximum value\".\n- In forced colors (Windows' contrast themes) the track and its fill would disappear, since they're painted as a gradient. bestax's styles paint the fill in the system's highlight color and the rest of the track in its text color there, so the track shows how far it's filled. The mark labels draw in its text color too, and the tick lines in its button text color, with a hairline in the page's color down the middle where a line crosses the track, so it shows on the track and on the fill. A disabled slider draws its track, thumbs, ticks and labels in its color for disabled text instead. All of them draw at full strength there.\n- Has `aria-valuenow`, `aria-valuemin`, and `aria-valuemax` attributes\n- The thumb's `aria-valuetext` is what `getAriaValueText` returns, or else the value bubble's text when `formatOutput` or `scale` is set, whether or not the bubble shows, so ``formatOutput={v => `$${v}`}`` announces \"$41\" rather than \"41\".\n- The value bubble is an `<output>`, which a browser treats as a live region. It's set not to announce: a thumb announces its value as it's moved.\n- Fully keyboard accessible with arrow keys\n- Home and End move a thumb to the slider's ends. When `max` falls between two steps, End stops at the last step below it, the highest value the slider holds, and that's the value it reports. On a range Slider a thumb stops at the other thumb, or on the nearest step at least `minDistance` from it, or at the slider's end where there isn't that much room.\n- A range Slider with no `defaultValue` starts its high thumb at that highest value too, so
|
|
61
|
+
"accessibility": "- Uses native `<input type=\"range\">` element\n- The `label` prop, or the label of a `Field` the slider sits in, names its input.\n- In range mode the label starts each thumb's name, so `<Slider range label=\"Price range\" />` announces \"Price range Minimum value\" and \"Price range Maximum value\". Each thumb points `aria-labelledby` at the label and at a hidden span holding its own text, because an `aria-label` would outrank the label. The label's `for` still lands on the low thumb, so clicking the label focuses it.\n- `ariaLabel` wins over the label. In range mode each entry is that thumb's whole name, with no label in front, and an empty entry counts as unset.\n- An `aria-label` or `aria-labelledby` you pass straight to a range Slider names the whole Slider, so it takes the label's place at the start of both thumbs' names: `<Slider range aria-label=\"Budget\" />` announces \"Budget Minimum value\" and \"Budget Maximum value\". An `ariaLabel` entry still wins for its own thumb. To keep a label out of the thumbs' names altogether, pass `aria-labelledby={undefined}`, and they stay \"Minimum value\" and \"Maximum value\".\n- A `Field` label you wire by hand with `labelProps={{ htmlFor }}`, as in a horizontal form, gets no generated id, so give it one of your own there as well, as in `labelProps={{ htmlFor: 'price', id: 'price-label' }}`, and it starts both thumbs' names the same way. Without that `id` it reaches a range Slider only through its `for`, which the thumbs' default `aria-label` outranks, so they stay \"Minimum value\" and \"Maximum value\".\n- In forced colors (Windows' contrast themes) the track and its fill would disappear, since they're painted as a gradient. bestax's styles paint the fill in the system's highlight color and the rest of the track in its text color there, so the track shows how far it's filled. The mark labels draw in its text color too, and the tick lines in its button text color, with a hairline in the page's color down the middle where a line crosses the track, so it shows on the track and on the fill. A disabled slider draws its track, thumbs, ticks and labels in its color for disabled text instead. All of them draw at full strength there.\n- Has `aria-valuenow`, `aria-valuemin`, and `aria-valuemax` attributes\n- The thumb's `aria-valuetext` is what `getAriaValueText` returns, or else the value bubble's text when `formatOutput` or `scale` is set, whether or not the bubble shows, so ``formatOutput={v => `$${v}`}`` announces \"$41\" rather than \"41\".\n- The value bubble is an `<output>`, which a browser treats as a live region. It's set not to announce: a thumb announces its value as it's moved.\n- Fully keyboard accessible with arrow keys\n- Home and End move a thumb to the slider's ends. When `max` falls between two steps, End stops at the last step below it, the highest value the slider holds, and that's the value it reports. On a range Slider a thumb stops at the other thumb, or on the nearest step at least `minDistance` from it, or at the slider's end where there isn't that much room.\n- A range Slider with no `defaultValue` starts its high thumb at that highest value too, and a single one at the value it holds nearest 0, so the thumb's `aria-valuenow`, its value bubble and its fill say where it sits.\n- Focus states clearly visible\n- On a right-to-left page the native range mirrors, and the fill, the tick marks and the value bubble follow it, so a value of 25 fills from the right. A vertical slider still fills from the bottom.\n- In forced colors (Windows' contrast themes) the value bubble takes the page's own background, and every side of its arrow would be painted, drawing it as a square. bestax's styles outline the bubble in the system's text color there, and keep the arrow a triangle in that color, pointing at the thumb whichever side the bubble sits on.\n- The `message` describes the slider through `aria-describedby`, both thumbs in range mode. Ids you pass in `aria-describedby` go first, on the only thumb or the low one, where the other attributes go.",
|
|
62
62
|
"related": ["Numberinput", "Progress"],
|
|
63
63
|
"storybook": "https://bestax.io/storybook/?path=/story/form-slider",
|
|
64
64
|
"summary": "The `Slider` component provides a range slider input for selecting values within a range.",
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
{
|
|
93
93
|
"name": "defaultValue",
|
|
94
94
|
"type": "number | [number, number]",
|
|
95
|
-
"default":
|
|
96
|
-
"description": "Default value for uncontrolled usage.",
|
|
95
|
+
"default": null,
|
|
96
|
+
"description": "Default value for uncontrolled usage. Without it a single Slider starts at the value it holds nearest 0: 0 itself when 0 is one of its steps, `min` when 0 is below it, or the highest value it holds when 0 is above that. A range Slider starts at `min` and that highest value.",
|
|
97
97
|
"required": false,
|
|
98
98
|
"inherited": true,
|
|
99
99
|
"deprecated": false
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
"code": "function example() {\n return (\n <Field\n horizontal\n label=\"Time\"\n labelProps={{ htmlFor: 'time-field-control' }}\n >\n <Field.Body>\n <Field>\n <Control iconLeftName=\"clock\">\n <TimeInput id=\"time-field-control\" placeholder=\"HH:MM\" />\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.\n- An `inline` picker has no input for its `label` to name, so its root is a `role=\"group\"` the `label` names through `aria-labelledby` and its `message` describes. A labeled `Field` around it names it the same way, unless the `Field` is `grouped` or `hasAddons`, or a label is wired by hand with `labelProps.htmlFor`. An `aria-label` or `aria-labelledby` you give it names it instead. With no name it stays a plain `div`, and its wheels inside keep their own names.\n- Each spinner column has `role=\"spinbutton\"` with `aria-valuemin`, `aria-valuemax`, `aria-valuenow`, and `aria-valuetext`, whose text is the number as the column 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 spinbutton columns rather than a toggle button. Its `aria-valuetext` is `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; `↑`, `PageUp` and `End` move it to PM, and `↓`, `PageDown` and `Home` move it to AM. It stops at either end instead of wrapping around. Its accessible name is `AM/PM` unless `labels.ampm` sets another.\n- A `readOnly` inline picker puts `aria-readonly=\"true\"` on each spinbutton and keeps them in the tab order.\n- A `disabled` inline picker puts `aria-disabled=\"true\"` on each spinbutton and takes them out of the tab order.\n- In forced colors (Windows' contrast themes), the band behind the picked values is replaced, so bestax's styles draw it in the system's highlight color there, and the focus ring inside it in the color made to read on it. The values keep the system's text color, so each reads on the band and off it as the wheel turns. When the picker is disabled, the band and the values take the system's color for a disabled control, at full opacity, as a value the picker blocks does.\n- Honors `prefers-reduced-motion`.\n- On a right-to-left page the launcher sits at the end of the line and the clock icon at the start. The wheels keep `dir=\"ltr\"`, so hours stay to the left of minutes.\n- A panel at a corner that would run past the left or right edge of the screen keeps its\n corner and moves sideways just far enough to fit, or, wider than the screen, to the edge its\n text starts from. On a narrow screen the panel in place is a sheet across the screen\n instead, which fits as it is.\n- The `message` describes the input through `aria-describedby`, so a screen reader reads it when the input takes focus. Ids you pass in `aria-describedby` go on the container with the other attributes, except on a phone's native input, which lists them first. An `inline` picker has no input, so there the message describes the picker's group, when something names it.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the container, so a screen reader hears the input is invalid when it takes focus. An `inline` picker has no input, and they stay on its container.\n- The input takes its name from `label`, from a labeled `Field` that isn't `grouped` or `hasAddons` around a `TimeInputBase` with no `id` of its own, or from a `<label htmlFor>` of your own pointing at the `id` you give it. `aria-label` and `aria-labelledby` go on the container with the other attributes you pass, so they don't name the input, except on the native input `mobileNative` renders, which takes them itself. An `inline` picker has no input to name.\n- An `autoComplete` you give goes on the field. Without one the text field turns autocomplete off, since the browser's own suggestions would cover the panel. A time that autofill writes commits when it reads in the token `format` (the default one when `format` is `Intl` options) or through your `parse`. One it can't read, or that `min`, `max` or a blocked time rules out, isn't committed, as with typing: the field shows it as written, and submits it under a `name`, until focus next leaves the field.",
|
|
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.\n- An `inline` picker has no input for its `label` to name, so its root is a `role=\"group\"` the `label` names through `aria-labelledby` and its `message` describes. A labeled `Field` around it names it the same way, unless the `Field` is `grouped` or `hasAddons`, or a label is wired by hand with `labelProps.htmlFor`. An `aria-label` or `aria-labelledby` you give it names it instead. With no name it stays a plain `div`, and its wheels inside keep their own names.\n- Each spinner column has `role=\"spinbutton\"` with `aria-valuemin`, `aria-valuemax`, `aria-valuenow`, and `aria-valuetext`, whose text is the number as the column 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 spinbutton columns rather than a toggle button. Its `aria-valuetext` is `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; `↑`, `PageUp` and `End` move it to PM, and `↓`, `PageDown` and `Home` move it to AM. It stops at either end instead of wrapping around. Its accessible name is `AM/PM` unless `labels.ampm` sets another.\n- A `readOnly` inline picker puts `aria-readonly=\"true\"` on each spinbutton and keeps them in the tab order.\n- A `disabled` inline picker puts `aria-disabled=\"true\"` on each spinbutton and takes them out of the tab order.\n- In forced colors (Windows' contrast themes), the band behind the picked values is replaced, so bestax's styles draw it in the system's highlight color there, and the focus ring inside it in the color made to read on it. The values keep the system's text color, so each reads on the band and off it as the wheel turns. When the picker is disabled, the band and the values take the system's color for a disabled control, at full opacity, as a value the picker blocks does.\n- Honors `prefers-reduced-motion`.\n- On a right-to-left page the launcher sits at the end of the line and the clock icon at the start. The wheels keep `dir=\"ltr\"`, so hours stay to the left of minutes.\n- In forced colors (Windows' contrast themes), a disabled launcher draws in the system's color for a disabled control, at full strength rather than faded.\n- A panel at a corner that would run past the left or right edge of the screen keeps its\n corner and moves sideways just far enough to fit, or, wider than the screen, to the edge its\n text starts from. On a narrow screen the panel in place is a sheet across the screen\n instead, which fits as it is.\n- The `message` describes the input through `aria-describedby`, so a screen reader reads it when the input takes focus. Ids you pass in `aria-describedby` go on the container with the other attributes, except on a phone's native input, which lists them first. An `inline` picker has no input, so there the message describes the picker's group, when something names it.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the container, so a screen reader hears the input is invalid when it takes focus. An `inline` picker has no input, and they stay on its container.\n- The input takes its name from `label`, from a labeled `Field` that isn't `grouped` or `hasAddons` around a `TimeInputBase` with no `id` of its own, or from a `<label htmlFor>` of your own pointing at the `id` you give it. `aria-label` and `aria-labelledby` go on the container with the other attributes you pass, so they don't name the input, except on the native input `mobileNative` renders, which takes them itself. An `inline` picker has no input to name.\n- An `autoComplete` you give goes on the field. Without one the text field turns autocomplete off, since the browser's own suggestions would cover the panel. A time that autofill writes commits when it reads in the token `format` (the default one when `format` is `Intl` options) or through your `parse`. One it can't read, or that `min`, `max` or a blocked time rules out, isn't committed, as with typing: the field shows it as written, and submits it under a `name`, until focus next leaves the field.",
|
|
182
182
|
"related": ["DateInput", "DateTimeInput", "Input"],
|
|
183
183
|
"storybook": "https://bestax.io/storybook/?path=/story/form-timeinput",
|
|
184
184
|
"summary": "The `TimeInput` component is a form input that opens a popover spinner for time-of-day selection.",
|
|
@@ -363,6 +363,9 @@ header taller than Bulma's navbar sets it there. `AppFrame.Nav width` writes
|
|
|
363
363
|
`--bulma-autocomplete-scrollbar-thumb-hover`, `--bulma-autocomplete-scrollbar-track`,
|
|
364
364
|
`--bulma-autocomplete-scrollbar-width`
|
|
365
365
|
|
|
366
|
+
In forced colors `--bulma-autocomplete-item-disabled-opacity` doesn't apply: a disabled item
|
|
367
|
+
draws at full strength in the system's color for disabled text.
|
|
368
|
+
|
|
366
369
|
`--bulma-autocomplete-border-hover-color` is registered but has no effect: the input's hover
|
|
367
370
|
border is Bulma's own.
|
|
368
371
|
|
|
@@ -406,6 +409,9 @@ the class prefix in a prefixed build) keeps what's inside it on the light scheme
|
|
|
406
409
|
`--bulma-carousel-overlay-indicator-background-active`,
|
|
407
410
|
`--bulma-carousel-overlay-indicator-background-hover`, `--bulma-carousel-transition-duration`
|
|
408
411
|
|
|
412
|
+
In forced colors `--bulma-carousel-arrow-disabled-opacity` doesn't apply without `arrowHover`: a
|
|
413
|
+
disabled arrow draws at full strength in the system's color for a disabled control.
|
|
414
|
+
|
|
409
415
|
`--bulma-carousel-item-gap` (a length, default `0px`) is the space between items in view; set it
|
|
410
416
|
on the carousel's own element through a class. The `--bulma-carousel-items-to-show*` variables
|
|
411
417
|
come from the `itemsToShow*` props, and `--bulma-carousel-items-in-view` is the one of them the
|
|
@@ -547,6 +553,10 @@ input's size, and they swap sides right to left. The panel is a `.color-picker`
|
|
|
547
553
|
`--bulma-colorinput-swatch-size`, `--bulma-colorinput-trigger-color`,
|
|
548
554
|
`--bulma-colorinput-trigger-hover-color`
|
|
549
555
|
|
|
556
|
+
In forced colors `--bulma-colorinput-disabled-opacity` doesn't apply to the launcher, which draws
|
|
557
|
+
at full strength in the system's color for a disabled control. The swatch keeps it, since its
|
|
558
|
+
color is the value it shows.
|
|
559
|
+
|
|
550
560
|
### ColorPicker
|
|
551
561
|
|
|
552
562
|
Declared on the root, `.color-picker`, and inherited by its parts, so a value set there, or on a
|
|
@@ -735,6 +745,9 @@ system highlight color whatever these say.
|
|
|
735
745
|
`--bulma-dropzone-name-color`, `--bulma-dropzone-reject-border-color`,
|
|
736
746
|
`--bulma-dropzone-size-color`, `--bulma-dropzone-size-font-size`, `--bulma-dropzone-spacing`
|
|
737
747
|
|
|
748
|
+
In forced colors `--bulma-dropzone-disabled-opacity` doesn't apply: a disabled zone draws at full
|
|
749
|
+
strength, its border and text in the system's color for a disabled control.
|
|
750
|
+
|
|
738
751
|
### EmptyState
|
|
739
752
|
|
|
740
753
|
Declared on the root, `.empty-state`. Each size class (`.is-small`, `.is-medium`, `.is-large`)
|
|
@@ -820,6 +833,9 @@ so each follows the other until you set it apart. The fades and the zoom take Bu
|
|
|
820
833
|
`--bulma-lightbox-toolbar-button-background`, `--bulma-lightbox-toolbar-button-background-hover`,
|
|
821
834
|
`--bulma-lightbox-toolbar-color`, `--bulma-lightbox-toolbar-gap`, `--bulma-lightbox-toolbar-icon-size`
|
|
822
835
|
|
|
836
|
+
In forced colors `--bulma-lightbox-disabled-opacity` doesn't apply: a button that does nothing at
|
|
837
|
+
an end or a zoom limit draws at full strength in the system's color for a disabled control.
|
|
838
|
+
|
|
823
839
|
### LinkButton
|
|
824
840
|
|
|
825
841
|
Declared on the compound `.button.link-button` — see the compound-selector exception above.
|
|
@@ -909,6 +925,10 @@ through `style`. Bulma's own `--bulma-notification-*` variables set the rest.
|
|
|
909
925
|
`--bulma-numberinput-stepper-button-hover-bg`, `--bulma-numberinput-stepper-button-hover-color`,
|
|
910
926
|
`--bulma-numberinput-stepper-width`
|
|
911
927
|
|
|
928
|
+
In forced colors `--bulma-numberinput-disabled-opacity` doesn't apply: a disabled Numberinput
|
|
929
|
+
isn't faded as a whole, and a stepper button disabled at a limit draws at full strength in the
|
|
930
|
+
system's color for a disabled control.
|
|
931
|
+
|
|
912
932
|
### Panel
|
|
913
933
|
|
|
914
934
|
Declared on the root, `.panel`, where Bulma declares its own `--bulma-panel-*`. Bulma writes the
|
|
@@ -972,6 +992,10 @@ DateRangeInput's with `monthsToShow`, past which the months wrap to a column.
|
|
|
972
992
|
`--bulma-picker-trigger-color`, `--bulma-picker-trigger-disabled-opacity`,
|
|
973
993
|
`--bulma-picker-trigger-hover-color`, `--bulma-picker-trigger-width`
|
|
974
994
|
|
|
995
|
+
In forced colors `--bulma-picker-trigger-disabled-opacity` doesn't apply: a disabled launcher
|
|
996
|
+
draws at full strength in the system's color for a disabled control, as PasswordInput's toggle
|
|
997
|
+
does.
|
|
998
|
+
|
|
975
999
|
### A panel's shift at a corner (Popover / HoverCard / Combobox / the pickers)
|
|
976
1000
|
|
|
977
1001
|
`--bulma-anchored-shift` is how far the component moves a panel in place sideways, from its
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bestax-mcp",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.79",
|
|
4
4
|
"mcpName": "io.github.allxsmith/bestax-mcp",
|
|
5
5
|
"description": "MCP server for @allxsmith/bestax-bulma — component props, examples, CSS variables and agent skills, served offline from a version-pinned index",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
44
44
|
"zod": "^4.6.7",
|
|
45
|
-
"@allxsmith/bestax-bulma": "^5.78.
|
|
45
|
+
"@allxsmith/bestax-bulma": "^5.78.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^26.6.6",
|