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=”radiogroup” aria-label=”Prescription Interval” class=”variable-items-wrapper button-variable-items-wrapper wvs-style-squared” data-attribute_name=”attribute_prescription-interval” data-attribute_values=”["1 month","3 months","6 months","12 months"]”><li aria-checked=”false” tabindex=”0″ data-wvstooltip=”1 month” class=”variable-item button-variable-item button-variable-item-1-month ” title=”1 month” data-title=”1 month” data-value=”1 month” role=”radio” tabindex=”0″><div class=”variable-item-contents”><span class=”variable-item-span variable-item-span-button”>1 month</span></div></li><li aria-checked=”false” tabindex=”0″ data-wvstooltip=”3 months” class=”variable-item button-variable-item button-variable-item-3-months ” title=”3 months” data-title=”3 months” data-value=”3 months” role=”radio” tabindex=”0″><div class=”variable-item-contents”><span class=”variable-item-span variable-item-span-button”>3 months</span></div></li><li aria-checked=”false” tabindex=”0″ data-wvstooltip=”6 months” class=”variable-item button-variable-item button-variable-item-6-months ” title=”6 months” data-title=”6 months” data-value=”6 months” role=”radio” tabindex=”0″><div class=”variable-item-contents”><span class=”variable-item-span variable-item-span-button”>6 months</span></div></li><li aria-checked=”false” tabindex=”0″ data-wvstooltip=”12 months” class=”variable-item button-variable-item button-variable-item-12-months ” title=”12 months” data-title=”12 months” data-value=”12 months” role=”radio” tabindex=”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!
The topic ‘HTML Validator Error: Duplicate attribute tabindex.’ is closed to new replies.