Merge pull request #22333 from Prospress/fix/21607
fix W3C validation errors in quantity-input.php template
This commit is contained in:
commit
127965419b
|
@ -25,7 +25,7 @@ if ( $max_value && $min_value === $max_value ) {
|
|||
<?php
|
||||
} else {
|
||||
/* translators: %s: Quantity. */
|
||||
$labelledby = ! empty( $args['product_name'] ) ? sprintf( __( '%s quantity', 'woocommerce' ), strip_tags( $args['product_name'] ) ) : '';
|
||||
$labelledby = ! empty( $args['product_name'] ) ? sprintf( __( '%s quantity', 'woocommerce' ), wp_strip_all_tags( $args['product_name'] ) ) : '';
|
||||
?>
|
||||
<div class="quantity">
|
||||
<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></label>
|
||||
|
@ -40,9 +40,10 @@ if ( $max_value && $min_value === $max_value ) {
|
|||
value="<?php echo esc_attr( $input_value ); ?>"
|
||||
title="<?php echo esc_attr_x( 'Qty', 'Product quantity input tooltip', 'woocommerce' ); ?>"
|
||||
size="4"
|
||||
pattern="<?php echo esc_attr( $pattern ); ?>"
|
||||
inputmode="<?php echo esc_attr( $inputmode ); ?>"
|
||||
<?php if ( ! empty( $labelledby ) ) { ?>
|
||||
aria-labelledby="<?php echo esc_attr( $labelledby ); ?>" />
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue