-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Gallery block: use image caption as fallback for alt text. #26082
Conversation
Size Change: -20 B (0%) Total Size: 1.19 MB
ℹ️ View Unchanged
|
7839b97
to
2648dab
Compare
Finally got around to actually testing this PR, and I discovered it didn't work. Turns out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected. The image caption is set as the alt text where there is none supplied. Thank you for working on this, Zeb! 👍
Hmm, I wonder if we still need the deprecation added in #25560, given we're no longer changing the output markup. |
@tellthemachines We're still changing the markup, though, aren't we? Prior to both this PR and #25560, the |
2648dab
to
8fe59b0
Compare
We're seeing some funky errors on the frontend with the gallery blocks because of captions that include links ( Should we strip the caption of any HTML prior to using it as |
Thanks for reporting this @ockham! Indeed the alt attribute shouldn't contain HTML. |
Description
Addresses feedback on #25560. The image alt text will now fall back to the caption text, and
aria-label
is no longer used.Checklist: