[Experimental] Product Gallery: Update div elements to ul/li for better accessibility (#43612)
* Product Gallery: Update div elements to ul and li for better accessibility * Product Gallery: Add changelog files --------- Co-authored-by: roykho <roykho77@gmail.com>
This commit is contained in:
parent
31c170f80c
commit
43be71a52f
|
@ -147,6 +147,18 @@ $admin-bar-mobile-height: 46px;
|
|||
max-width: $outside-image-max-width;
|
||||
}
|
||||
|
||||
.wc-block-product-gallery-large-image__container {
|
||||
display: flex;
|
||||
overflow-x: hidden;
|
||||
scroll-snap-type: x mandatory;
|
||||
scroll-behavior: auto;
|
||||
width: fit-content;
|
||||
height: fit-content;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wc-block-product-gallery-large-image__wrapper {
|
||||
aspect-ratio: 1 / 1;
|
||||
flex-shrink: 0;
|
||||
|
@ -158,16 +170,6 @@ $admin-bar-mobile-height: 46px;
|
|||
scroll-snap-align: none center;
|
||||
}
|
||||
|
||||
.wc-block-product-gallery-large-image__container {
|
||||
display: flex;
|
||||
overflow-x: hidden;
|
||||
scroll-snap-type: x mandatory;
|
||||
scroll-behavior: auto;
|
||||
width: fit-content;
|
||||
height: fit-content;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#{$gallery-next-previous-inside-image} & .wc-block-product-gallery-large-image__image-element {
|
||||
width: fit-content;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
Significance: patch
|
||||
Type: tweak
|
||||
Comment: Product Gallery: Update div elements to ul and li for better accessibility.
|
|
@ -0,0 +1,3 @@
|
|||
Significance: patch
|
||||
Type: tweak
|
||||
Comment: Product Gallery: Update div elements to ul and li for better accessibility.
|
|
@ -87,9 +87,9 @@ class ProductGalleryLargeImage extends AbstractBlock {
|
|||
|
||||
return strtr(
|
||||
'<div class="wc-block-product-gallery-large-image wp-block-woocommerce-product-gallery-large-image" {directives}>
|
||||
<div class="wc-block-product-gallery-large-image__container">
|
||||
<ul class="wc-block-product-gallery-large-image__container">
|
||||
{main_images}
|
||||
</div>
|
||||
</ul>
|
||||
{content}
|
||||
</div>',
|
||||
array(
|
||||
|
@ -142,7 +142,7 @@ class ProductGalleryLargeImage extends AbstractBlock {
|
|||
|
||||
$main_image_with_wrapper = array_map(
|
||||
function( $main_image_element ) {
|
||||
return "<div class='wc-block-product-gallery-large-image__wrapper'>" . $main_image_element . '</div>';
|
||||
return "<li class='wc-block-product-gallery-large-image__wrapper'>" . $main_image_element . '</li>';
|
||||
},
|
||||
$main_images
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue