ariakit

Toolkit for building accessible web apps with React

MIT License

Downloads
2.7M
Stars
7.7K
Committers
119

Bot releases are visible (Hide)

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 10 months ago

Modal Combobox

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.

Controlling the auto-select functionality of Combobox

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;
  }}
/>

Styling Combobox without an active descendant

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;
}

Other updates

  • Fixed useTabStore return value not updating its own reference.
  • Fixed keyboard navigation on Combobox when the content element is a grid.
  • Fixed ComboboxDisclosure to update its aria-expanded attribute when the combobox expands.
  • Fixed Maximum update depth exceeded warning when rendering multiple collection items on the page.
  • Improved JSDocs.
  • Updated dependencies: @ariakit/[email protected]
ariakit - @ariakit/[email protected]

Published by github-actions[bot] 10 months ago

  • Fixed Maximum update depth exceeded warning when rendering multiple collection items on the page.
  • Improved JSDocs.
ariakit - @ariakit/[email protected]

Published by github-actions[bot] 10 months ago

Overwriting aria-selected value on ComboboxItem

It's now possible to pass a custom aria-selected value to the ComboboxItem component, overwriting the internal behavior.

Limiting slide on popovers

When 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.

Other updates

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 10 months ago

Overwriting aria-selected value on ComboboxItem

It's now possible to pass a custom aria-selected value to the ComboboxItem component, overwriting the internal behavior.

Limiting slide on popovers

When 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.

Other updates

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 10 months ago

Automatic role on ComboboxGroup

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.

Custom submenu auto focus

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.

Hovercard display timeout

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.

Other updates

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 10 months ago

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 10 months ago

Automatic role on ComboboxGroup

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.

Custom submenu auto focus

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.

Hovercard display timeout

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.

Other updates

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 10 months ago

  • Fixed CollectionItem elements getting out of order when composing stores.
  • Fixed unmounted SelectPopover not re-opening when its open state is initially set to true.
  • Fixed TypeScript build errors.
ariakit - @ariakit/[email protected]

Published by github-actions[bot] 11 months ago

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 11 months ago

Multi-selectable Combobox

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.

New Combobox components

This version introduces new Combobox components:

Other updates

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 11 months ago

Multi-selectable Combobox

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.

New Combobox components

This version introduces new Combobox components:

Other updates

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 11 months ago

Multi-selectable Combobox

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.

Other updates

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 11 months ago

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 11 months ago

Expanding Menubar

The Menubar component will now only expand if there's another menu already expanded in the same menubar.

Internal data attribute changes

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.

Other updates

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 11 months ago

Expanding Menubar

The Menubar component will now only expand if there's another menu already expanded in the same menubar.

Internal data attribute changes

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.

Other updates

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 11 months ago

  • Fixed setSelectionRange error when used with unsupported input types.
ariakit - @ariakit/[email protected]

Published by github-actions[bot] 11 months ago

Data attributes for duplicate components

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.

Multiple disclosure and anchor elements

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.

Expanding Menubar with 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.

Maintaining Popover tab order

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.

New Menubar components

This version introduces a new Menubar module that can be used without the MenubarProvider wrapper.

Other updates

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 11 months ago

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 11 months ago

Data attributes for duplicate components

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.

Multiple disclosure and anchor elements

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.

Expanding Menubar with 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.

Maintaining Popover tab order

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.

New Menubar components

This version introduces a new Menubar module that can be used without the MenubarProvider wrapper.

Other updates

ariakit - @ariakit/[email protected]

Published by github-actions[bot] 11 months ago

  • Added new menubar module.
Package Rankings
Top 1.05% on Npmjs.org
Top 6.73% on Proxy.golang.org