@ariakit/react 0.4.12 → 0.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @ariakit/react
2
2
 
3
+ ## 0.4.13
4
+
5
+ ### Accessible composite widgets with invalid `activeId`
6
+
7
+ We've improved the logic for composite widgets such as [Tabs](https://ariakit.org/components/tab) and [Toolbar](https://ariakit.org/components/toolbar) when the [`activeId`](https://ariakit.org/reference/composite-provider#activeid) state points to an element that is disabled or missing from the DOM. This can happen if an item is dynamically removed, disabled, or lazily rendered, potentially making the composite widget inaccessible to keyboard users.
8
+
9
+ Now, when the [`activeId`](https://ariakit.org/reference/composite-provider#activeid) state is invalid, all composite items will remain tabbable, enabling users to <kbd>Tab</kbd> into the composite widget. Once a composite item receives focus or the element referenced by the [`activeId`](https://ariakit.org/reference/composite-provider#activeid) state becomes available, the roving tabindex behavior is restored.
10
+
11
+ ### Other updates
12
+
13
+ - Fixed regression in [`focusShift`](https://ariakit.org/reference/composite-provider#focusshift).
14
+ - Fixed [Radio](https://ariakit.org/components/radio) to prevent `onChange` from triggering on radios that are already checked.
15
+ - Fixed [`DisclosureContent`](https://ariakit.org/reference/disclosure-content) setting an incorrect `animating` state value during enter animations.
16
+ - Improved JSDocs.
17
+ - Updated dependencies: `@ariakit/react-core@0.4.13`
18
+
3
19
  ## 0.4.12
4
20
 
5
21
  ### Tab panels with scroll restoration
@@ -37,7 +53,7 @@ A new [`--dialog-viewport-height`](https://ariakit.org/guide/styling#--dialog-vi
37
53
 
38
54
  ### Overriding composite state for specific methods
39
55
 
40
- The [`next`](https://ariakit.org/reference/use-composite-store#next), [`previous`](https://ariakit.org/reference/use-composite-store#previous), [`up`](https://ariakit.org/reference/use-composite-store#up), and [`down`](https://ariakit.org/reference/use-composite-store#down) methods of the [composite store](https://ariakit.org/reference/use-composite-store) now accept an object as the first argument to override the composite state for that specific method. For example, you can pass a different [`activeId`](https://ariakit.org/reference/use-composite-store#activeId) value to the [`next`](https://ariakit.org/reference/use-composite-store#next) method so it returns the next item based on that value rather than the current active item in the composite store:
56
+ The [`next`](https://ariakit.org/reference/use-composite-store#next), [`previous`](https://ariakit.org/reference/use-composite-store#previous), [`up`](https://ariakit.org/reference/use-composite-store#up), and [`down`](https://ariakit.org/reference/use-composite-store#down) methods of the [composite store](https://ariakit.org/reference/use-composite-store) now accept an object as the first argument to override the composite state for that specific method. For example, you can pass a different [`activeId`](https://ariakit.org/reference/use-composite-store#activeid) value to the [`next`](https://ariakit.org/reference/use-composite-store#next) method so it returns the next item based on that value rather than the current active item in the composite store:
41
57
 
42
58
  ```js
43
59
  const store = useCompositeStore({ defaultActiveId: "item1" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariakit/react",
3
- "version": "0.4.12",
3
+ "version": "0.4.13",
4
4
  "description": "Toolkit for building accessible web apps with React",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",
@@ -37,7 +37,7 @@
37
37
  "components"
38
38
  ],
39
39
  "dependencies": {
40
- "@ariakit/react-core": "0.4.12"
40
+ "@ariakit/react-core": "0.4.13"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0",