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
2 changes: 1 addition & 1 deletion packages/block-library/src/cover/edit/block-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default function CoverBlockControls( {
<ToolbarButton
ref={ editMediaButtonRef }
icon={ crop }
label={ __( 'Crop background image' ) }
label={ __( 'Edit image' ) }
onClick={ onEditMedia }
aria-haspopup="dialog"
// Disable rather than hide while the edited image
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ export default function Image( {
onClick={ openImageMediaEditorModal }
aria-haspopup="dialog"
icon={ crop }
label={ __( 'Crop' ) }
label={ __( 'Edit image' ) }
// Disable rather than hide while the edited image
// loads, so the button keeps focus when the modal
// closes instead of dropping it to the canvas.
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/site-logo/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ const SiteLogo = ( {
}
aria-haspopup="dialog"
icon={ crop }
label={ __( 'Crop' ) }
label={ __( 'Edit image' ) }
/>
</BlockControls>
) }
Expand Down
10 changes: 5 additions & 5 deletions test/e2e/specs/editor/blocks/image.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ test.describe( 'Image', () => {
] = await editor.getBlocks();

// Open the media editor modal from the block toolbar.
await editor.clickBlockToolbarButton( 'Crop' );
await editor.clickBlockToolbarButton( 'Edit image' );
const modal = page.locator( 'role=dialog[name="Edit media"i]' );
await expect( modal ).toBeVisible();

Expand Down Expand Up @@ -268,11 +268,11 @@ test.describe( 'Image', () => {
imageBlock.locator( '.components-spinner' )
).toBeHidden();

// Closing the modal returns focus to the Crop toolbar button. The
// button is disabled (not hidden) while the edit loads, so it stays in
// the DOM to receive focus rather than dropping it to the canvas.
// Closing the modal returns focus to the "Edit image" toolbar button.
// The button is disabled (not hidden) while the edit loads, so it stays
// in the DOM to receive focus rather than dropping it to the canvas.
await expect(
page.locator( 'role=button[name="Crop"i]' )
page.locator( 'role=button[name="Edit image"i]' )
).toBeFocused();
} );

Expand Down
Loading