Skip Navigation

[Resolved] wpv-filter-search-box input name uses underscores

This support ticket is created 2 years, 9 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Shane 2 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#2127061

Hi! In a recent accessibility review of our site, the keyword filter on hidden link was flagged for the label for attribute (for="wpv-post-search" - dashes) not matching the input name (name="wpv_post_search" - underscores).

The name is generated automatically within the view from this shortcode: [wpv-filter-search-box output="bootstrap"]. The label is editable within the view, and I could just set it to match there if need be. However, this is the only filter where the generated name uses underscores, and I'm guessing that may be a typo somewhere in the plugin, so I'm thinking it would make more sense for that to be updated to behave like the others.

Let me know if there's more info about this that would be helpful.

Thanks!

#2127137

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Matthew,

Thank you for getting in touch.

If I understand the issue correctly here, you are saying that on the backend you've given the search field the name "wpv-post-search" but on the frontend its generating as 'wpv_post_search'.

What I know is that the name attribute is generally matching the URL parameter and for Toolset Views underscores are used for the URL Parameter.

Thanks,
Shane

#2127243

Hi Shane,

Thanks for the response. This is the simplified version of the code I get when I add filters in my view. If you look at each of the selects, the label for attribute matches the select name attribute. It's only for the keyword input that the generated name does not match the generated label. Since that one filter is an outlier, and since the markup it generates breaks accessibility for the filter, I think it should ideally be changed. Like I said, I can go in to the view and edit the label instead if need be, but I think something is wrong with this one input attribute not doing what all the others do.

<div class="form-group">
	<label for="wpv-post-search">Keyword</label>
	<input type="text" name="wpv_post_search"  class="js-wpv-filter-trigger-delayed form-control" />
</div>
  <div class="form-group">
	<label for="wpv-resource-category">Categories</label>
	<select name="wpv-resource-category" class="js-wpv-filter-trigger form-control"></select>
</div>
<div class="form-group">
	<label for="wpv-resource-audience">Audiences</label>
	<select name="wpv-resource-audience" class="js-wpv-filter-trigger form-control"></select>
</div>
  <div class="form-group">
	<label for="wpv-access-type">Access types</label>
	<select name="wpv-access-type" class="js-wpv-filter-trigger form-control"></select>
</div>
#2128199

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Matthew,

What I know is that the search field is generated as [wpv-filter-search-box output="bootstrap"] and the name attribute is not available with the search box.

I believe it would be easier here for you to change the for attribute to use underscore rather than having to pass this to our development team to make the change as this would be considered as low priority and wouldn't get fixed anytime soon.

Thanks,
Shane

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