[Resolved] wpv-filter-search-box input name uses underscores
This support ticket is created 3 years, 4 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
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.
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 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.
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.