Toolkit for building accessible web apps with React
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] 10 months ago
The Combobox components now support the modal
prop on ComboboxPopover
.
When a modal combobox is expanded, users can interact with and tab through all the combobox controls, including Combobox
, ComboboxDisclosure
, and ComboboxCancel
, even if they're rendered outside the popover. The rest of the page will be inert.
The Combobox
component now includes a new getAutoSelectId
prop. This allows you to specify the ComboboxItem
that should be auto-selected if the autoSelect
prop is true
.
By default, the first enabled item is auto-selected. Now you can customize this behavior by returning the id of another item from getAutoSelectId
:
<Combobox
autoSelect
getAutoSelectId={(items) => {
// Auto select the first enabled item with a value
const item = items.find((item) => {
if (item.disabled) return false;
if (!item.value) return false;
return true;
});
return item?.id;
}}
/>
The Combobox
component now includes a data-active-item
attribute when it's the only active item in the composite widget. In other words, when no ComboboxItem
is active and the focus is solely on the combobox input.
You can use this as a CSS selector to style the combobox differently, providing additional affordance to users who pressed ↑ on the first item or ↓ on the last item. This action would place both virtual and actual DOM focus on the combobox input.
.combobox[data-active-item] {
outline-width: 2px;
}
useTabStore
return value not updating its own reference.ComboboxDisclosure
to update its aria-expanded
attribute when the combobox expands.Maximum update depth exceeded
warning when rendering multiple collection items on the page.@ariakit/[email protected]
Published by github-actions[bot] 10 months ago
Maximum update depth exceeded
warning when rendering multiple collection items on the page.Published by github-actions[bot] 10 months ago
aria-selected
value on ComboboxItem
It's now possible to pass a custom aria-selected
value to the ComboboxItem
component, overwriting the internal behavior.
slide
on popoversWhen components like Popover and Menu with the slide
prop are positioned to the right or left of the anchor element, they will now cease to slide across the screen, disengaged from the anchor element, upon reaching the edge of said element.
blurOnHoverEnd
set to false
not keeping submenus open.CompositeItem
.preserveTabOrderAnchor
on nested menus.preserveTabOrder
prop.Published by github-actions[bot] 10 months ago
aria-selected
value on ComboboxItem
It's now possible to pass a custom aria-selected
value to the ComboboxItem
component, overwriting the internal behavior.
slide
on popoversWhen components like Popover and Menu with the slide
prop are positioned to the right or left of the anchor element, they will now cease to slide across the screen, disengaged from the anchor element, upon reaching the edge of said element.
blurOnHoverEnd
set to false
not keeping submenus open.CompositeItem
.preserveTabOrderAnchor
on nested menus.preserveTabOrder
prop.@ariakit/[email protected]
Published by github-actions[bot] 10 months ago
The ComboboxGroup
component now automatically assigns the role
attribute as rowgroup
if it's nestled within a ComboboxPopover
or ComboboxList
wrapper that has the role
attribute set to grid
.
When opening nested Menu components with Enter, Space, or arrow keys, the first tabbable element will now receive focus, even if it's not a MenuItem
element. This should enable custom popups that behave like submenus, but use different semantics.
The Hovercard, Menu, and Tooltip components now display synchronously when the timeout
or showTimeout
states are set to 0
. This should stop submenus from vanishing for a few frames prior to displaying a new menu when hovering over menu items in sequence.
CollectionItem
elements getting out of order when composing stores.MenuButton
not assigning the correct role
attribute when used within a ComboboxList
element.MenuItem
with an explicit focusOnHover
prop not moving focus properly.blurOnHoverEnd
not working on submenu triggers.open
state.SelectPopover
not re-opening when its open
state is initially set to true
.portal
prop with VoiceOver.@ariakit/[email protected]
Published by github-actions[bot] 10 months ago
@ariakit/[email protected]
Published by github-actions[bot] 10 months ago
The ComboboxGroup
component now automatically assigns the role
attribute as rowgroup
if it's nestled within a ComboboxPopover
or ComboboxList
wrapper that has the role
attribute set to grid
.
When opening nested Menu components with Enter, Space, or arrow keys, the first tabbable element will now receive focus, even if it's not a MenuItem
element. This should enable custom popups that behave like submenus, but use different semantics.
The Hovercard, Menu, and Tooltip components now display synchronously when the timeout
or showTimeout
states are set to 0
. This should stop submenus from vanishing for a few frames prior to displaying a new menu when hovering over menu items in sequence.
CollectionItem
elements getting out of order when composing stores.MenuButton
not assigning the correct role
attribute when used within a ComboboxList
element.MenuItem
with an explicit focusOnHover
prop not moving focus properly.blurOnHoverEnd
not working on submenu triggers.open
state.SelectPopover
not re-opening when its open
state is initially set to true
.portal
prop with VoiceOver.@ariakit/[email protected]
Published by github-actions[bot] 10 months ago
CollectionItem
elements getting out of order when composing stores.SelectPopover
not re-opening when its open
state is initially set to true
.Published by github-actions[bot] 11 months ago
@ariakit/[email protected]
Published by github-actions[bot] 11 months ago
We've added support for the Combobox with multiple selection capabilities using a new selectedValue
prop, along with defaultSelectedValue
and setSelectedValue
.
This works similarly to the value
prop on Select components. If it receives an array, the combobox will allow multiple selections. By default, it's a string that represents the selected value in a single-select combobox.
Check out the Multi-selectable Combobox example to see it in action.
This version introduces new Combobox components:
ComboboxLabel
: This renders a label
element for a Combobox
, with the htmlFor
prop set automatically.ComboboxItemCheck
: This displays a checkmark for a ComboboxItem
when the item is selected.resetValueOnSelect
state to Combobox components.selectValueOnClick
prop to ComboboxItem
.SelectItem
rendering an aria-selected
attribute even when the value
prop is omitted.@ariakit/[email protected]
Published by github-actions[bot] 11 months ago
We've added support for the Combobox with multiple selection capabilities using a new selectedValue
prop, along with defaultSelectedValue
and setSelectedValue
.
This works similarly to the value
prop on Select components. If it receives an array, the combobox will allow multiple selections. By default, it's a string that represents the selected value in a single-select combobox.
Check out the Multi-selectable Combobox example to see it in action.
This version introduces new Combobox components:
ComboboxLabel
: This renders a label
element for a Combobox
, with the htmlFor
prop set automatically.ComboboxItemCheck
: This displays a checkmark for a ComboboxItem
when the item is selected.resetValueOnSelect
state to Combobox components.selectValueOnClick
prop to ComboboxItem
.SelectItem
rendering an aria-selected
attribute even when the value
prop is omitted.@ariakit/[email protected]
Published by github-actions[bot] 11 months ago
We've added support for the Combobox with multiple selection capabilities using a new selectedValue
prop, along with defaultSelectedValue
and setSelectedValue
.
This works similarly to the value
prop on Select components. If it receives an array, the combobox will allow multiple selections. By default, it's a string that represents the selected value in a single-select combobox.
Check out the Multi-selectable Combobox example to see it in action.
resetValueOnSelect
state to Combobox components.Published by github-actions[bot] 11 months ago
@ariakit/[email protected]
Published by github-actions[bot] 11 months ago
The Menubar component will now only expand if there's another menu already expanded in the same menubar.
Just like the change in v0.3.6 that removed the data-command
and data-disclosure
attributes from elements, this update stops the data-composite-hover
attribute from infiltrating composite item elements in the DOM. We're mentioning this in the changelog as some users might have snapshot tests that require updating.
setSelectionRange
error when used with unsupported input types.MenuButton
with showOnHover
not updating the activeId
state when hovered.onFocusVisible
element type on Focusable
from Element
to HTMLElement
.@ariakit/[email protected]
Published by github-actions[bot] 11 months ago
The Menubar component will now only expand if there's another menu already expanded in the same menubar.
Just like the change in v0.3.6 that removed the data-command
and data-disclosure
attributes from elements, this update stops the data-composite-hover
attribute from infiltrating composite item elements in the DOM. We're mentioning this in the changelog as some users might have snapshot tests that require updating.
setSelectionRange
error when used with unsupported input types.MenuButton
with showOnHover
not updating the activeId
state when hovered.onFocusVisible
element type on Focusable
from Element
to HTMLElement
.@ariakit/[email protected]
Published by github-actions[bot] 11 months ago
setSelectionRange
error when used with unsupported input types.Published by github-actions[bot] 11 months ago
The internal logic that identifies duplicate components has been refined. This implies that some internal data-*
attributes will no longer seep into the rendered DOM elements. If you're doing snapshot tests on the DOM generated by Ariakit components, you should see the data-command
and data-disclosure
attributes removed.
The disclosureElement
and anchorElement
states on Disclosure, Popover, and Menu, along with related components, are now set only upon interaction.
This change enables us to support multiple disclosure/anchor elements for the same contentElement
(typically the popup element) when triggered by hover or focus.
Adjacent Menu
popups will now open when the focus moves through MenuItem
elements in a Menubar. Before, they would only open when another Menu
was already visible.
Popover
and related components now automatically set the new preserveTabOrderAnchor
prop as the disclosure element.
This ensures that, when the portal
prop is enabled, the tab order will be preserved from the disclosure to the content element even when the Popover
component is rendered in a different location in the React tree.
This version introduces a new Menubar module that can be used without the MenubarProvider
wrapper.
HovercardAnchor
elements.preserveTabOrderAnchor
prop to Portal
and related components.tabbable
prop to CompositeItem
and related components.blurOnHoverEnd
prop to CompositeHover
and related components.@ariakit/[email protected]
Published by github-actions[bot] 11 months ago
@ariakit/[email protected]
Published by github-actions[bot] 11 months ago
The internal logic that identifies duplicate components has been refined. This implies that some internal data-*
attributes will no longer seep into the rendered DOM elements. If you're doing snapshot tests on the DOM generated by Ariakit components, you should see the data-command
and data-disclosure
attributes removed.
The disclosureElement
and anchorElement
states on Disclosure, Popover, and Menu, along with related components, are now set only upon interaction.
This change enables us to support multiple disclosure/anchor elements for the same contentElement
(typically the popup element) when triggered by hover or focus.
Adjacent Menu
popups will now open when the focus moves through MenuItem
elements in a Menubar. Before, they would only open when another Menu
was already visible.
Popover
and related components now automatically set the new preserveTabOrderAnchor
prop as the disclosure element.
This ensures that, when the portal
prop is enabled, the tab order will be preserved from the disclosure to the content element even when the Popover
component is rendered in a different location in the React tree.
This version introduces a new Menubar module that can be used without the MenubarProvider
wrapper.
HovercardAnchor
elements.preserveTabOrderAnchor
prop to Portal
and related components.tabbable
prop to CompositeItem
and related components.blurOnHoverEnd
prop to CompositeHover
and related components.@ariakit/[email protected]
Published by github-actions[bot] 11 months ago
menubar
module.