From b6e4bf274ec5e6efdf2b63b656665281253dafa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alba=20Rinc=C3=B3n?= Date: Tue, 17 May 2022 14:34:26 +0200 Subject: [PATCH] Don't allow alt if the image is a bg not an img element --- assets/js/blocks/featured-product/block.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/assets/js/blocks/featured-product/block.js b/assets/js/blocks/featured-product/block.js index db747fa433e..263b309343d 100644 --- a/assets/js/blocks/featured-product/block.js +++ b/assets/js/blocks/featured-product/block.js @@ -278,6 +278,8 @@ const FeaturedProduct = ( { // so we need to check if it exists before using it. const focalPointPickerExists = typeof FocalPointPicker === 'function'; + const isImgElement = ! isRepeated && ! hasParallax; + return ( <> @@ -404,7 +406,7 @@ const FeaturedProduct = ( { } ) } /> - { ! isRepeated && ( + { isImgElement && ( { this.setState( { doUrlUpdate: true } ); }; + render() { return (