Change from using a `figure` to using a `div` around the single product image (#37853)

This commit is contained in:
Ron Rennick 2023-04-25 17:05:31 -03:00 committed by GitHub
commit dec3e66410
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 7 deletions

View File

@ -0,0 +1,4 @@
Significance: major
Type: enhancement
Change from using a figure to using a div around the single product image to improve accessibility

View File

@ -285,7 +285,8 @@
}
}
figure.woocommerce-product-gallery__wrapper {
figure.woocommerce-product-gallery__wrapper,
div.woocommerce-product-gallery__wrapper {
margin: 0;
}
@ -299,7 +300,8 @@
margin: 0;
}
figure.woocommerce-product-gallery__wrapper {
figure.woocommerce-product-gallery__wrapper,
div.woocommerce-product-gallery__wrapper {
margin: 0;
}

View File

@ -298,7 +298,8 @@ $tt2-gray: #f7f7f7;
}
}
figure.woocommerce-product-gallery__wrapper {
figure.woocommerce-product-gallery__wrapper,
div.woocommerce-product-gallery__wrapper {
margin: 0;
}
@ -312,7 +313,8 @@ $tt2-gray: #f7f7f7;
margin: 0;
}
figure.woocommerce-product-gallery__wrapper {
figure.woocommerce-product-gallery__wrapper,
div.woocommerce-product-gallery__wrapper {
margin: 0;
}

View File

@ -12,7 +12,7 @@
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 3.5.1
* @version 7.8.0
*/
defined( 'ABSPATH' ) || exit;
@ -37,7 +37,7 @@ $wrapper_classes = apply_filters(
);
?>
<div class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?>" data-columns="<?php echo esc_attr( $columns ); ?>" style="opacity: 0; transition: opacity .25s ease-in-out;">
<figure class="woocommerce-product-gallery__wrapper">
<div class="woocommerce-product-gallery__wrapper">
<?php
if ( $post_thumbnail_id ) {
$html = wc_get_gallery_image_html( $post_thumbnail_id, true );
@ -51,5 +51,5 @@ $wrapper_classes = apply_filters(
do_action( 'woocommerce_product_thumbnails' );
?>
</figure>
</div>
</div>