Skip Navigation

[Resolved] Doing AODA compliance – missing TEXT for LABEL in parametric search

This support ticket is created 4 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 2.11 hours from now. Thank you for your understanding.

This topic contains 3 replies, has 1 voice.

Last updated by Woody 4 years, 2 months ago.

Author
Posts
#1542463

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?

#1542469

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"

#1542543

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>';

#1542625

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!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.