Support » Plugin: Qty Increment Buttons for WooCommerce » Minor html error in default template

  • Paul



    Found this line in your template:

    				<?php if (isset($input_id)) printf('id="%s"', esc_attr($input_id) ); ?>
    				class="<?php echo esc_attr( isset($classes) ? join( ' ', (array) $classes ) : 'input-text qty text' ); ?>"
    				step="<?php echo esc_attr( $step ); ?>"
    				min="<?php echo esc_attr( $min_value ); ?>"
    				max="<?php echo esc_attr( 0 < $max_value ? $max_value : '' ); ?>"
    				name="<?php echo esc_attr( $input_name ); ?>"
    				value="<?php echo esc_attr( $input_value ); ?>"
    				title="<?php echo esc_attr_x( 'Qty', 'Product quantity input tooltip', 'woocommerce' ); ?>"
    				placeholder="<?php echo esc_attr( $placeholder ); ?>"
    				inputmode="<?php echo esc_attr( $inputmode ); ?>" />

    It’s really just a minor thing but an <input type=”number”> with a size attribute is basically invalid html as the specs say:

    size does still exist for HTML5, but it is only effective for these types: text, search, tel, url, email, and password
    size refers to the length of the text, so it only applies to strings

    I know, i don’t want to be to picky about that, and the woocommerce default one has it as well, but hey let’s improve things if we can šŸ™‚ might be nice if that size=”4″ could be just removed, i like to validate my pages and have at least have no “errors” on my page šŸ˜‰

    Thanks for your great plugin!

    • This topic was modified 1 year ago by Paul.
    • This topic was modified 1 year ago by Paul.
Viewing 1 replies (of 1 total)
  • Thread Starter Paul


    Also would be nice to get rid of the type=”text/javascript” on the inline script if ThemeSupportHtml5 is set in WP.

Viewing 1 replies (of 1 total)
  • The topic ‘Minor html error in default template’ is closed to new replies.