We are using checkboxes to aid in search queries on this page: hidden link
It has been working great since day one however doing our AODA compliance for this client we are getting this error:
input element that contains a type attribute value of "checkbox" must have text in its associated label.
Line: 359, Column:76
<input value="2016" type="checkbox" class="js-wpv-filter-trigger" name="wpv-archive-year[]" id="in-archive-year-158" />
*** if you do an inspect of this page, it is clear that there are "numbered years (i.e. 2020, etc)" in between the LABEL tags but the AODA scanner is not finding same
*** Here is a source code snippet: <li id='archive-year-196'><label class="selectit"><input value="2020" type="checkbox" class="js-wpv-filter-trigger" name="wpv-archive-year[]" id="in-archive-year-196" /> 2020</label>
Any ideas of how to resolve this?
I noticed a "leading space" in front of the year when viewing the source code ... this may be the root cause?
<label class="selectit"><input value="2019" type="checkbox" class="js-wpv-filter-trigger" name="wpv-archive-year[]" id="in-archive-year-195"> 2019</label> *** leading space is in front of the 2019 and after the quotation"
Getting there ...
I added the dynamic "label for=" in this file: "wpv-filter-embedded.php"
$output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . '<label for="in-'.$taxonomy.'-' . $category->term_id . '" class="selectit'. ( !empty($this->label_class) ? ' '. $this->label_class : '' ) .'"'. ( !empty($this->label_style) ? ' style="' . $this->label_style . '"' : '' ) .'><input'. ( !empty($this->style) ? ' style="' . $this->style . '"' : '' ) .' value="' . $real_value . '" type="checkbox" class="js-wpv-filter-trigger'. ( !empty($this->input_class) ? ' '. $this->input_class : '' ) .'" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '" checked /> ' . $tax_option . '</label>';
My issue is resolved now. Thank you!
However ... I might recommend your coding gurus do some edits to these PHP files to allow your plugin to be ADA and AODA compliant.
Cheers!