Updated: Comment #7
Problem/Motivation
Noticed while working on #1898442: responsive_image.module - Convert theme_ functions to Twig
According to the specification for the picture element, there shouldn't be alt or title attributes on the picture tag.
The alt attribute belongs on the img element.
There may be further changes required to match our usage of picture with the evolving standard, which would be handled by another issue. However the alt attribute is currently causing an issue with the Twig conversion #1898442: responsive_image.module - Convert theme_ functions to Twig. Removing alt allows us to proceed with that conversion.
Reference: http://picture.responsiveimages.org
Proposed resolution
Remove the alt from picture html element.
Remaining tasks
create patch to remove alt attribute from picture tag. update the code that generates the html and the tests for picture alt.
User interface changes
No.
API changes
No.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | picture-alt-removal-2211831-16.patch | 1.12 KB | rainbowarray |
| #11 | picture-alt-removal-2211831-10.patch | 1.03 KB | rainbowarray |
Comments
Comment #1
jayeshanandani commentedComment #2
jayeshanandani commentedComment #3
jayeshanandani commentedComment #4
rainbowarrayComment #5
jayeshanandani commentedComment #6
jayeshanandani commentedComment #7
yesct commentedusing more of the issue summary template
Comment #8
yesct commentedoops some of the tags from the cloned issue are not appropriate here.
Comment #9
yesct commentedno patch yet, so active.
Comment #10
rainbowarraySo this is actually a really simple patch. The tests for the alt attribute were added in #1898442: responsive_image.module - Convert theme_ functions to Twig, as far as I can tell, so this just removes the alt attribute from the picture element itself.
Comment #11
rainbowarrayHelps if I upload the patch.
Comment #12
joelpittetNot related to twig, but RTBC:)
Thanks you guys for that and the extra missing title variable documentation.
Comment #13
attiks commentedFYI: picture is renamed to responsive_image so this needs a reroll once #2124377-74: Rename "Picture" module to "Responsive Image" module is committed
Comment #14
webchickYeah, since that patch is a much bigger PITA to re-roll, and it looks pretty close, marking this one "postponed."
Comment #15
rainbowarray#2124377: Rename "Picture" module to "Responsive Image" module went in, so unpostponed.
Comment #16
rainbowarrayRevised patch targeting the new module name.
Comment #17
joelpittetBack to RTBC, barring testbot fails.
Comment #18
webchickSorry, that is annoying me on issue listings. ;)
Comment #19
webchickCommitted and pushed to 8.x. Thanks!
Comment #20
eli-t