Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image: Fix inclusion of alttext in lightbox button aria-label #55000

Closed
wants to merge 1 commit into from
Closed
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/block-library/src/image/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ function block_core_image_render_lightbox( $block_content, $block ) {

$aria_label = __( 'Enlarge image' );

$processor->next_tag( 'img' );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At line 138 the $processor instance is used again but now it points to the img. To my understanding, a new instance should be created before using get_updated_html()?

$alt_attribute = $processor->get_attribute( 'alt' );

if ( null !== $alt_attribute ) {
Expand Down
Loading