Picture element images: Add missing alt text#1319
Picture element images: Add missing alt text#1319westonruter merged 12 commits intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
It might need some test cases to be written/updated?
mukeshpanchal27
left a comment
There was a problem hiding this comment.
Thanks @devansh016 for working on it. Left one question and code suggestion.
| esc_attr( 'wp-picture-' . $attachment_id ), | ||
| $picture_sources, | ||
| $original_image_without_srcset | ||
| $image |
There was a problem hiding this comment.
@adamsilverstein As a fallback image, we should return the original image. In this MDN documentation, they return the original image instead of mime-type-specific images.
I couldn't find proper documentation for this. What do you think?
There was a problem hiding this comment.
Yes, I think this is right.
Also, I think the source being generated for 'image/jpeg' can also be removed as well, because if the browser doesn't support AVIF/WebP then it can just fall back to the img which is a JPEG.
There was a problem hiding this comment.
performance/plugins/webp-uploads/picture-element.php
Lines 56 to 64 in 1ed2fbd
Should we remove line 61 for the same.
There was a problem hiding this comment.
I think we can open a separate PR for this issue to avoid complicating the current one. This will allow us to address it more effectively.
Co-authored-by: Weston Ruter <westonruter@google.com>
Summary
Fixes #1315
Relevant technical choices
For maintainers only, please make sure:
[Type]label.no milestonelabel if it does not apply to any specific plugin.skip changeloglabel if it should not be mentioned in the plugin's changelog.-->