Skip to content

Packages: Update Ariakit to 0.4.39 - #82831

Merged
ciampo merged 7 commits into
trunkfrom
codex/deps-ariakit-react-0.4.39
Sep 14, 2026
Merged

ciampo merged 7 commits into
trunkfrom
codex/deps-ariakit-react-0.4.39

Conversation

@ciampo

@ciampo ciampo commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

What?

Updates @ariakit/react from 0.4.37 to 0.4.39 in @wordpress/components and @wordpress/dataviews.

This is a maintenance update. It does not add a Gutenberg API or intentional interface behavior.

The lockfile also updates Ariakit's internal packages: react-components 0.4.1 → 0.6.0, components 0.1.10 → 0.1.12, react-store 0.1.9 → 0.1.10, react-utils 0.2.4 → 0.2.5, store 0.1.8 → 0.1.9, and utils 0.1.6 → 0.2.0.

Upstream release span:

Why?

These releases improve cross-window event handling, disabled and keyboard interactions, composite item registration, popup remounting, and modal popup semantics. The 0.4.39 modal fallback also fixes roles for menu and listbox popups and improves modal menu naming. Gutenberg picks up these upstream patch fixes without changing its component contracts.

The update affects Ariakit-backed menus, tabs, tooltips, toolbars, composites, selection controls, and the DataViews filter search widget. Peer support remains unchanged at React 17, 18, and 19.

Upstream release audit

0.4.38

  • Native-like keyboard activation: Ariakit now dispatches a PointerEvent for Enter and Space activation on non-native Command elements. The event comes from the element's owner window and is composed. This applies to Gutenberg's Menu items and triggers, Composite items, Radio controls, CustomSelectControl items, Tabs, Toolbar items, and Disclosure controls, including consumers rendered in an editor iframe.
  • Cross-document and form-name robustness: Composite events now use the correct window constructors. Portal, Tooltip, Combobox, Dialog, Popover, Menu, and Tab code no longer breaks when a document contains form controls named defaultView, activeElement, self, document, or ownerDocument. This is relevant to Gutenberg's same-origin iframe canvases and form-heavy editor screens.
  • Correct disabled and hover behavior: disabled links no longer navigate on middle click; Tooltip anchors and Menu buttons resolve disabled and accessibleWhenDisabled correctly; and ComboboxItem and SelectItem hover callbacks no longer run while their widgets are closed. This applies to Gutenberg's Tabs, Menu, Tooltip, CustomSelectControl, and the DataViews search widget, which explicitly uses focusOnHover.
  • Focus preservation: Dialog-derived popups now avoid pulling focus back during placement and return focus correctly in the form-name edge case. Tabs also receive DOM focus when selection changes in that edge case.

0.4.39

  • Valid modal popup structure and names: the visually hidden fallback dismiss button now renders beside a modal popup instead of inside it. Modal Menu and listbox roles therefore no longer own an invalid button. Nested dismiss buttons are tracked correctly, and modal Menu keeps the accessible name supplied by its MenuButton. This applies directly to Menu.Popover, which is modal by default, and to Ariakit-backed selection popups when they are modal.
  • Stable active items and keyboard movement: Combobox autoSelect no longer leaves a stale highlighted option for one frame after filtering. Composite items honor the innermost accessibleWhenDisabled value, and Composite no longer completes or replays stale movement after active-item changes or remounts. This applies to the DataViews filter search widget (autoSelect="always") and Gutenberg's Composite, Menu, and Toolbar components.
  • Correct Combobox and Menu semantics: ComboboxItem resolves its role from its explicit store, while Menu removes stale aria-labelledby when its disclosure changes to an element without an ID. Gutenberg uses both composable patterns.

The remaining 0.4.39 notes do not match a current Gutenberg configuration: this repository does not use Ariakit's nested ComboboxPopover/List grid pattern, ComboboxGroup or ComboboxRow, a changing Select name, or a dynamically toggled Ariakit backdrop prop.

No opt-in API is required for the relevant fixes. The repository has no Ariakit patch-package patch or dependency override. Existing local Menu focus-handoff and Tooltip aria-describedby accommodations remain necessary because these releases do not address those contracts.

How?

Updates both direct declarations and the shared lockfile. It also:

  • adds a Browser Mode integration test that searches DataViews author filter options, selects an author with the keyboard, and verifies that only that author's posts remain in the results table;
  • moves the existing Space-key Menu assertion and the ColorPalette, GradientPicker, and DuotonePicker suites to Browser Mode, where real browser events and Ariakit registration are available;
  • removes a duplicate jsdom modal-focus assertion because the Browser Mode suite already covers the harder nested-menu case;
  • keeps structural Toolbar, DataViews, TimePicker, DimensionsTool, Flex layout, and block-directory assertions in jsdom, with waits tied to visible final state where Ariakit schedules item registration. The cross-package Flex and block-directory module graphs are not stable Browser Mode unit-test boundaries.

@ariakit/test is not updated or restored because it is no longer a direct dependency after #80995.

Testing Instructions

  1. Open Storybook at Components / Actions / Menu. Open and close the default menu with the pointer and confirm item selection still dismisses it.
  2. Open Components / Selection & Input / Common / CustomSelectControl. Change the selection and confirm the popover, active option, and selected value stay in sync.
  3. Open Components / Containers / Tabs and Components / Overlays / Tooltip. Switch tabs, focus and hover tooltip anchors, and confirm the overlays remain positioned and dismiss correctly.
  4. Open DataViews / DataViews. Check the grid and list layouts, then add and use a filter with searchable options. Confirm the options appear, hover and keyboard focus remain in sync, and the selected filter is applied.

Testing Instructions for Keyboard

  1. In the Menu story, Tab to Open menu and press Space. Confirm the menu opens.
  2. Use the arrow keys to move through items and submenus. Use Enter or Space to activate an item.
  3. Press Escape. Confirm the menu closes and focus returns to its trigger.
  4. Repeat the main selection flow in CustomSelectControl and the DataViews searchable filter without using a pointer.
Automated verification
  • Full production build and TypeScript typecheck.
  • Dependency, lockfile, published-package, formatting, and JavaScript lint checks.
  • 300 focused @wordpress/components tests across Menu, Tabs, TabPanel, Composite, CustomSelectControl, Toolbar, Tooltip, ColorPalette, GradientPicker, and DuotonePicker.
  • 470 active @wordpress/dataviews tests. Three pre-existing tests remain skipped. The new filter integration test was also verified to fail when option selection was temporarily disconnected from the view update.
  • 61 focused TimePicker, DimensionsTool, and block-directory regression tests in jsdom, plus seven Flex layout tests.
  • The 12 migrated or adjusted test files also pass unchanged on trunk at 887d7abce93 with Ariakit 0.4.37 (201/201 tests). The separately added DataViews filter integration test was verified with Ariakit 0.4.39.
  • The existing npm audit baseline remains 47 advisories; none involve Ariakit.

Screenshots or screencast

Not applicable. This maintenance change does not intentionally change the interface.

Use of AI Tools

Codex authored the dependency analysis, implementation, tests, and pull request text. The author has not yet completed a manual review.

@github-actions github-actions Bot added [Package] Components /packages/components [Package] DataViews /packages/dataviews labels Sep 14, 2026
@ciampo ciampo added the [Type] Code Quality Issues or PRs that relate to code quality label Sep 14, 2026
@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

🤖 PR meta 🤖

📦 Bundle size

Size Change: +3.79 kB (+0.05%)

Total Size: 8.19 MB

📦 View Changed
Filename Size Change
build/scripts/components/index.min.js 325 kB +1.34 kB (+0.41%)
build/scripts/edit-site/index.min.js 379 kB +894 B (+0.24%)
build/scripts/editor/index.min.js 607 kB +695 B (+0.11%)
build/scripts/media-utils/index.min.js 203 kB +869 B (+0.43%)

9fee8be Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 19bd5ba trunk % Change
timeToFirstByte 57.7 ms +17.33% -2.43% 57.7 ms +5.29% -4.42% 0%
largestContentfulPaint 100 ms +4% -8% 94 ms +8.51% -6.38% 6.38%
lcpMinusTtfb 35.5 ms +22.54% -3.24% 35.65 ms +12.06% -5.75% -0.42%
wpBeforeTemplate 27.91 ms +23.04% -2.19% 27.53 ms +12.35% -1.71% 1.38%
wpTemplate 24.87 ms +7% -1.81% 24.9 ms +6.1% -5.02% -0.12%
wpTotal 53.49 ms +17.18% -2.73% 53.77 ms +5.15% -4.71% -0.52%
wpMemoryUsage 7.53 MB +0% -0% 7.49 MB +0% -0% 0.46%
wpDbQueries 17 +0% -0% 17 +0% -0% 0%

front-end-classic-theme

Metric 19bd5ba trunk % Change
timeToFirstByte 47.5 ms +4.84% -3.05% 47.8 ms +3.56% -4.29% -0.63%
largestContentfulPaint 104 ms +3.85% -0% 104 ms +1.92% -3.85% 0%
lcpMinusTtfb 57.65 ms +1.3% -2.6% 55.5 ms +3.51% -1.26% 3.87%
wpBeforeTemplate 24.3 ms +9.01% -0.74% 24.56 ms +8.79% -1.87% -1.06%
wpTemplate 18.7 ms +3.21% -2.14% 19.11 ms +6.07% -4.55% -2.15%
wpTotal 44.05 ms +5.22% -3.22% 44.31 ms +3.93% -4.08% -0.59%
wpMemoryUsage 6.15 MB +0% -0% 6.11 MB +0% -0% 0.58%
wpDbQueries 14 +0% -0% 14 +0% -0% 0%

media-processing

Metric 19bd5ba trunk % Change
mediaProcessingJpeg 417.17 ms +2.96% -0.84% 410.76 ms +0.85% -0.34% 1.56%
mediaProcessingAvif 6158.37 ms +0.25% -0.06% 6168.58 ms +0.04% -0.48% -0.17%
mediaProcessingJpegToAvif 4318.81 ms +0.58% -0.49% 4309.33 ms +0.3% -0.16% 0.22%

media-upload

Metric 19bd5ba trunk % Change
jpegUploadProcessing 1454.92 ms +35.79% -2.31% 1430.6 ms +1.34% -1.3% 1.7%
pngUploadProcessing 221.05 ms +3.87% -5.43% 215.1 ms +1.72% -3.73% 2.77%
largeJpegUploadProcessing 1420.8 ms +0.66% -0.54% 1414.37 ms +0.87% -0.54% 0.45%
multipleImageUploadProcessing 1616.22 ms +29.33% -1% 1600.49 ms +1.78% -1.87% 0.98%

post-editor

Metric 19bd5ba trunk % Change
serverResponse 511.19 ms +3.06% -5.16% 504.61 ms +7.33% -7.96% 1.3%
firstPaint 239.39 ms +19.85% -11.8% 221.12 ms +19.06% -23.34% 8.26%
domContentLoaded 1084.68 ms +2.04% -1% 1087.55 ms +3.69% -2.38% -0.26%
loaded 1086.17 ms +2.04% -1.01% 1088.73 ms +3.71% -2.35% -0.24%
firstContentfulPaint 446.26 ms +1.9% -3.67% 445.34 ms +2.51% -4.59% 0.21%
firstBlock 3273.67 ms +1.67% -0.65% 3259.28 ms +0.59% -1.31% 0.44%
type 21.72 ms +2.9% -4.37% 21.19 ms +11.51% -3.49% 2.5%
typeWithoutInspector 21.75 ms +1.33% -9.47% 21.83 ms +6.32% -3.89% -0.37%
typeWithTopToolbar 26.87 ms +8.97% -4.8% 25.04 ms +11.3% -3.59% 7.31%
typeContainer 9.1 ms +14.51% -3.52% 8.91 ms +15.15% -3.03% 2.13%
focus 74.38 ms +9.85% -2.93% 70.62 ms +8.11% -4.45% 5.32%
firstFocus 191.29 ms +0% -0% 218.87 ms +0% -0% -12.6%
selectAll 503.11 ms +4.57% -1.05% 517.2 ms +2.06% -5.33% -2.72%
listViewOpen 72.11 ms +3.48% -6.25% 69.86 ms +6.01% -7.84% 3.22%
inserterOpen 23.57 ms +12.01% -8.27% 23.86 ms +3.6% -10.98% -1.22%
inserterHover 4.02 ms +6.47% -9.95% 3.85 ms +7.01% -8.05% 4.42%
inserterSearch 7.56 ms +6.75% -3.84% 8.23 ms +10.33% -11.3% -8.14%
loadPatterns 639.92 ms +3.59% -1% 664.04 ms +1.77% -4.91% -3.63%
wpTotal 501.01 ms +3.12% -5.27% 494.13 ms +7.51% -7.94% 1.39%
wpMemoryUsage 13.06 MB +0% -0% 13.03 MB +0% -0% 0.25%
wpDbQueries 54 +0% -1.85% 54 +0% -0% 0%

site-editor

Metric 19bd5ba trunk % Change
serverResponse 514.25 ms +2.55% -4.39% 493.63 ms +1.56% -4.55% 4.18%
firstPaint 298.67 ms +20.96% -26% 251.35 ms +11.1% -3.91% 18.83%
domContentLoaded 1155.25 ms +2.9% -1.21% 1155.39 ms +1.81% -0.85% -0.01%
loaded 1156.52 ms +2.9% -1.21% 1156.61 ms +1.81% -0.85% -0.01%
firstContentfulPaint 463.58 ms +6.12% -2.67% 446.23 ms +5.48% -2.2% 3.89%
firstBlock 4243.97 ms +1.52% -0.18% 4235.38 ms +0.93% -0.62% 0.2%
type 22.45 ms +1.74% -4.86% 21.3 ms +8.08% -2.3% 5.4%
navigate 104.71 ms +15.04% -0.98% 105.52 ms +7.59% -1.1% -0.77%
loadPatterns 1402.12 ms +15.75% -5.63% 1456.09 ms +8.24% -9.28% -3.71%
loadPages 1105.62 ms +1.03% -1.83% 1074.92 ms +0.67% -0.57% 2.86%
wpTotal 504.24 ms +2.62% -4.34% 483.68 ms +1.54% -4.53% 4.25%
wpMemoryUsage 12.02 MB +0% -0% 11.98 MB +0% -0% 0.31%
wpDbQueries 43 +2.33% -0% 43.5 +1.15% -1.15% -1.15%

9fee8be Run

@github-actions github-actions Bot added the [Package] Block editor /packages/block-editor label Sep 14, 2026
@ciampo ciampo self-assigned this Sep 14, 2026
@ciampo
ciampo marked this pull request as ready for review September 14, 2026 10:16
@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Comment thread packages/dataviews/src/dataviews/test/filters.browser.test.tsx Outdated
@ciampo
ciampo force-pushed the codex/deps-ariakit-react-0.4.39 branch from 1380985 to 9fee8be Compare September 14, 2026 20:04
@ciampo
ciampo enabled auto-merge (squash) September 14, 2026 20:07
@ciampo
ciampo merged commit 07193e1 into trunk Sep 14, 2026
94 of 95 checks passed
@ciampo
ciampo deleted the codex/deps-ariakit-react-0.4.39 branch September 14, 2026 20:31
@github-actions github-actions Bot added this to the Gutenberg 24.1 milestone Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Block editor /packages/block-editor [Package] Components /packages/components [Package] DataViews /packages/dataviews [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants