Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Bug Fixes

- `mediaFinalize` now returns the post-finalize attachment (transformed from the REST response), so the upload-media queue can refresh the in-flight attachment URL. Required for the front-end `srcset` to render on client-side-media uploads that exceeded the big-image threshold.
- Template actions panel: Fix the keyboard activation of the "Change template" preview so it only opens the swap modal on <kbd>Enter</kbd> / <kbd>Space</kbd> ([#78641](https://github.com/WordPress/gutenberg/pull/78641)).

## 14.46.0 (2026-05-14)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
import { useState } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
import { decodeEntities } from '@wordpress/html-entities';
import { ENTER, SPACE } from '@wordpress/keycodes';
import { store as noticesStore } from '@wordpress/notices';
import { store as preferencesStore } from '@wordpress/preferences';
// eslint-disable-next-line @wordpress/use-recommended-components -- `Tooltip` is not yet on the recommended `@wordpress/ui` allow-list; landing as a migration step ahead of the wider rollout.
Expand Down Expand Up @@ -127,7 +128,15 @@ export default function TemplateActionsPanelContent() {
tabIndex={ 0 }
aria-label={ tooltipText }
onClick={ () => setIsSwapModalOpen( true ) }
onKeyPress={ () => setIsSwapModalOpen( true ) }
onKeyDown={ ( event ) => {
if (
event.keyCode === ENTER ||
event.keyCode === SPACE
) {
event.preventDefault();
setIsSwapModalOpen( true );
}
} }
>
{ previewContent }
</div>
Expand Down
Loading