Merge pull request #31105 from matchboxdesigngroup/fix/a11y-improvement-add-to-cart-variable

A11y improvement to the variable product add to cart table on product singles
This commit is contained in:
Peter Fabian 2021-12-08 18:38:01 +01:00 committed by GitHub
commit d53a472bf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -453,12 +453,13 @@ p.demo_store,
td,
th {
border: 0;
vertical-align: top;
line-height: 2em;
vertical-align: top;
}
label {
font-weight: 700;
text-align: left;
}
select {

View File

@ -12,7 +12,7 @@
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 3.5.5
* @version 6.1.0
*/
defined( 'ABSPATH' ) || exit;
@ -35,7 +35,7 @@ do_action( 'woocommerce_before_add_to_cart_form' ); ?>
<tbody>
<?php foreach ( $attributes as $attribute_name => $options ) : ?>
<tr>
<td class="label"><label for="<?php echo esc_attr( sanitize_title( $attribute_name ) ); ?>"><?php echo wc_attribute_label( $attribute_name ); // WPCS: XSS ok. ?></label></td>
<th class="label"><label for="<?php echo esc_attr( sanitize_title( $attribute_name ) ); ?>"><?php echo wc_attribute_label( $attribute_name ); // WPCS: XSS ok. ?></label></th>
<td class="value">
<?php
wc_dropdown_variation_attribute_options(