Skip to content

Commit

Permalink
Feedback changes updated
Browse files Browse the repository at this point in the history
  • Loading branch information
karthick-murugan committed Jan 2, 2025
1 parent 19b3b43 commit 2a673cd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ export default function ImageSettingsPanel( {
// "RESET" button ONLY when the user has explicitly set a value in the
// Global Styles.
hasValue={ () => !! value?.lightbox }
label={ __( 'Enlarge image' ) }
label={ __( 'Enlarge on click' ) }
onDeselect={ resetLightbox }
isShownByDefault
panelId={ panelId }
>
<ToggleControl
__nextHasNoMarginBottom
label={ __( 'Enlarge image' ) }
label={ __( 'Enlarge on click' ) }
checked={ lightboxChecked }
onChange={ onChangeLightbox }
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,14 @@ const ImageURLInputUI = ( {
<div className="block-editor-url-popover__expand-on-click">
<Icon icon={ fullscreen } />
<div className="text">
<p>{ __( 'Enlarge image' ) }</p>
<p>{ __( 'Enlarge on click' ) }</p>
<p className="description">
{ __( 'Scales the image with a lightbox effect' ) }
</p>
</div>
<Button
icon={ linkOff }
label={ __( 'Disable Enlarge image' ) }
label={ __( 'Disable Enlarge on click' ) }
onClick={ () => {
onSetLightbox?.( false );
} }
Expand Down Expand Up @@ -372,7 +372,7 @@ const ImageURLInputUI = ( {
stopEditLink();
} }
>
{ __( 'Enlarge image' ) }
{ __( 'Enlarge on click' ) }
</MenuItem>
) }
</NavigableMenu>
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/gallery/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const LINK_OPTIONS = [
},
{
icon: fullscreen,
label: __( 'Enlarge image' ),
label: __( 'Enlarge on click' ),
value: LINK_DESTINATION_LIGHTBOX,
noticeText: __( 'Lightbox effect' ),
infoText: __( 'Scale images with a lightbox effect' ),
Expand Down
8 changes: 2 additions & 6 deletions packages/block-library/src/image/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,7 @@ function block_core_image_render_lightbox( $block_content, $block ) {
$img_styles = $p->get_attribute( 'style' );
$img_width = 'none';
$img_height = 'none';
$aria_label = __( 'Enlarge image' );

if ( $alt ) {
/* translators: %s: Image alt text. */
$aria_label = sprintf( __( 'Enlarge image: %s' ), $alt );
}
$aria_label = __( 'Enlarge' );

if ( isset( $block['attrs']['id'] ) ) {
$img_uploaded_src = wp_get_attachment_url( $block['attrs']['id'] );
Expand Down Expand Up @@ -234,6 +229,7 @@ class="lightbox-trigger"
type="button"
aria-haspopup="dialog"
aria-label="' . esc_attr( $aria_label ) . '"
aria-describedby="' . esc_attr( $alt ) . '"
data-wp-init="callbacks.initTriggerButton"
data-wp-on-async--click="actions.showLightbox"
data-wp-style--right="state.imageButtonRight"
Expand Down

0 comments on commit 2a673cd

Please sign in to comment.