Skip to content

Commit

Permalink
MWPW-159032: Defaults to empty alt tag on the svg - Accessibility req…
Browse files Browse the repository at this point in the history
…uirement (#3016)

Defaults empty alt for SEO
  • Loading branch information
joaquinrivero authored Nov 4, 2024
1 parent 6e7c03c commit c743765
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libs/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,7 @@ export function decorateSVG(a) {

const src = textUrl.hostname.includes(`.${SLD}.`) ? textUrl.pathname : textUrl;

const img = createTag('img', { loading: 'lazy', src });
if (altText) img.alt = altText;
const img = createTag('img', { loading: 'lazy', src, alt: altText || '' });
const pic = createTag('picture', null, img);

if (textUrl.pathname === hrefUrl.pathname) {
Expand Down

0 comments on commit c743765

Please sign in to comment.