github ariakit/ariakit @ariakit/react-core@0.4.25

latest releases: @ariakit/solid-core@0.1.5, @ariakit/test@0.4.14, @ariakit/react@0.4.25...
9 hours ago

Renamed offscreenBehavior to offscreenMode

BREAKING if you're using the offscreenBehavior prop on collection or composite item offscreen components.

The offscreenBehavior prop has been renamed to offscreenMode for consistency.

Before:

<ComboboxItem offscreenBehavior="lazy" />

After:

<ComboboxItem offscreenMode="lazy" />

Clicking outside no longer restores focus to the disclosure element

Dialog and components that extend it (such as Menu and Popover) no longer restore focus to the disclosure element when the dialog is closed by clicking or right-clicking outside. This aligns with native HTML <dialog> and popover behavior where trigger buttons don't receive focus when you interact outside.

Focus is still restored normally when the dialog is closed by other means, such as pressing Escape, selecting a menu item, or calling store.hide() programmatically. In these cases the disclosure element is now focused with default browser scrolling instead of preventScroll.

Improved Safari focus behavior for buttons, checkboxes, and radio buttons

On Safari, buttons, checkboxes, and radio buttons don't receive focus on mousedown like other browsers. Previously, this was handled by manually focusing the element in a mousedown handler. Now, an explicit tabIndex attribute is set on these elements in Safari, which causes the browser to focus them natively. This results in more predictable focus behavior and fewer timing-sensitive workarounds.

Other updates

  • Fixed a race condition in Dialog where the deferred auto-focus could steal focus from the disclosure element after the dialog was closed.
  • Fixed formStore.setError() and formStore.setFieldTouched() failing to set values on nested array field paths such as items.0.name.
  • Fixed SelectItem store item children property reflecting the value prop instead of the actual rendered text content.
  • Fixed MenuButton to preserve accessibleWhenDisabled behavior when composed with a rendered Button.
  • Fixed Menu with modal and getPersistentElements so focusing a persistent MenuButton doesn't immediately move focus back to the menu.
  • Fixed useMetadataProps overwriting parent metadata with undefined when the child doesn't provide an explicit value.
  • Fixed TabPanel not re-evaluating tabbable children when the panel becomes visible.
  • Fixed components not dropping their internal aria-labelledby when aria-label is passed.
  • Updated dependencies: @ariakit/core@0.4.19

Don't miss a new ariakit release

NewReleases is sending notifications on new releases.