Add role="presentation" to table within add-to-cart form. (#33123)

Add table role="presentation" for an accessibility enhancement.
This commit is contained in:
Ian Forrest 2022-05-27 15:58:38 -04:00 committed by GitHub
parent b85dca4308
commit 13f4e1572a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Add role="presentation" to table on the add-to-cart form as an accessibility enhancement.

View File

@ -31,7 +31,7 @@ do_action( 'woocommerce_before_add_to_cart_form' ); ?>
<?php if ( empty( $available_variations ) && false !== $available_variations ) : ?>
<p class="stock out-of-stock"><?php echo esc_html( apply_filters( 'woocommerce_out_of_stock_message', __( 'This product is currently out of stock and unavailable.', 'woocommerce' ) ) ); ?></p>
<?php else : ?>
<table class="variations" cellspacing="0">
<table class="variations" cellspacing="0" role="presentation">
<tbody>
<?php foreach ( $attributes as $attribute_name => $options ) : ?>
<tr>