fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

HTML Validator Error: Duplicate attribute tabindex.

Hi,

When running my site through https://validator.w3.org/nu/ I noticed an error to do with duplicate tabindexes. The error happens with this plugin, here is an example of the code:

ul role=”radiogrouparia-label=”Prescription Intervalclass=”variable-items-wrapper button-variable-items-wrapper wvs-style-squareddata-attribute_name=”attribute_prescription-intervaldata-attribute_values=”[&quot;1 month&quot;,&quot;3 months&quot;,&quot;6 months&quot;,&quot;12 months&quot;]“><li aria-checked=”falsetabindex=”0data-wvstooltip=”1 monthclass=”variable-item button-variable-item button-variable-item-1-month title=”1 monthdata-title=”1 monthdata-value=”1 monthrole=”radiotabindex=”0“><div class=”variable-item-contents“><span class=”variable-item-span variable-item-span-button“>1 month</span></div></li><li aria-checked=”falsetabindex=”0data-wvstooltip=”3 monthsclass=”variable-item button-variable-item button-variable-item-3-months title=”3 monthsdata-title=”3 monthsdata-value=”3 monthsrole=”radiotabindex=”0“><div class=”variable-item-contents“><span class=”variable-item-span variable-item-span-button“>3 months</span></div></li><li aria-checked=”falsetabindex=”0data-wvstooltip=”6 monthsclass=”variable-item button-variable-item button-variable-item-6-months title=”6 monthsdata-title=”6 monthsdata-value=”6 monthsrole=”radiotabindex=”0“><div class=”variable-item-contents“><span class=”variable-item-span variable-item-span-button“>6 months</span></div></li><li aria-checked=”falsetabindex=”0data-wvstooltip=”12 monthsclass=”variable-item button-variable-item button-variable-item-12-months title=”12 monthsdata-title=”12 monthsdata-value=”12 monthsrole=”radiotabindex=”0“><div class=”variable-item-contents“><span class=”variable-item-span variable-item-span-button“>12 months</span></div></li></ul>

As you can see, every <li> element has tabindex=”0″ twice.

The relevant code is in includes/class-woo-variation-swatches-product-page.php around line 370.

It is quite a minor issue, but I think HTML errors somewhat affect pagespeed scoring (I think, in any case our client would prefer to have no HTML validation errors).

Thanks!

Hakik Zaman

Hi Patrick,

Thanks for reaching out to us. Can you please share which Variation Swatches version you are using on your site?

Please make sure you have added any js to push “tabindex” to <li> or not. Also, you can plugin conflict test by disabling all plugins except WooCommerce and Variation Swatches.

To run the plugin conflict test, you can use Health Check & Troubleshooting plugin.

From my inspection, I didn’t find a second tabindex. You can check this URL: https://wptestbox.com/woovs/product/hoodie/

Here is a screenshot for you: https://prnt.sc/DSTM0CViAMOF

Thank You