Image: Fix inclusion of alttext in lightbox button aria-label#55000
Image: Fix inclusion of alttext in lightbox button aria-label#55000artemiomorales wants to merge 1 commit intotrunkfrom
Conversation
|
Thanks for working on this. That said, I think the same fix should be applied also to the file in the block-supports? |
|
|
||
| $aria_label = __( 'Enlarge image' ); | ||
|
|
||
| $processor->next_tag( 'img' ); |
There was a problem hiding this comment.
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()?
@afercia Pardon, got it, will be sure to create related issues for PRs going forward to make sure we coordinate more effectively 👍 |
What?
The logic to include alttext in the lightbox button's aria-label was not working properly, and screen readers were not able process that information as a result. This fixes that.
Why?
We want users who use screen readers to have a good experience when navigating pages that contain the lightbox.
How?
It adds back a line of logic that had been accidentally removed that allows us to create the aria-label with the alttext.
Testing Instructions
Testing Instructions for Keyboard
N/A (specified above)