Mark the reassurance icons as decorative - #1102
Conversation
The six img tags in the three blockreassurance overrides carry no alt attribute, so SEO crawlers and HTML validators report them as missing and screen readers fall back to announcing the file name. Each icon sits next to the block title and description, which already carry the meaning, so the correct value is an empty alt, as done for the payment option logo in PrestaShop#1060.
tblivet
left a comment
There was a problem hiding this comment.
Thanks @boo-code, it all looks good!
I left a suggestion on those same lines, here's why: in the custom_icon statement the whole class attribute is wrapped in {if $block['is_svg']}, so a merchant who uploads a PNG or a JPG instead of an SVG ends up with an carrying no class at all and
img-fluid is needed there. It's a small bug that can be fixed along with this PR 👍
|
🟢 Approved: the missing text alternative is fixed, and with the suggested change to the custom_icon lines the oversized icon is fixed too. AI-assisted QA: an agent drove a real browser through the steps below and drafted this comment. Worth a sanity check. Measured on PrestaShop 9.3.0, PHP 8.1.33, Hummingbird 2.1.0, blockreassurance 6.0.0, with all three changed templates rendering on one page (header, footer and product hooks all enabled, nine icons: three uploaded photos, three custom SVGs, three pack SVGs). On the commit this branched from, then on this branch with the suggestion applied:
The alt attributes are the change as published. The last three rows are what the suggested Preconditions, smoke pages, console errors and network errors were identical in both runs. |


alton the siximgtags either, so the default PrestaShop 9 front office renders the reassurance icons with no alt attribute. Each icon sits next to the block title and description, so it is redundant to adjacent text and getsalt="", the same call as #1060 for the payment option logo.imgtags inside.reassurance__imagenow carryalt="". Verified on a 9.2 shop: before,<img class="svg img-fluid invisible" src="...security.svg">; after, the same tag withalt="". The rendered pixels are unchanged.Related
Companion PR on the module itself, for shops using a theme that does not override these templates: PrestaShop/blockreassurance#818