Skip to content

Instantly share code, notes, and snippets.

@rianrietveld
Created July 10, 2018 13:43
Show Gist options
  • Save rianrietveld/74ffd4214bacbbb4e7a2abe7de830398 to your computer and use it in GitHub Desktop.
Save rianrietveld/74ffd4214bacbbb4e7a2abe7de830398 to your computer and use it in GitHub Desktop.
FacetWP Search input field misses corresponding label
Current code:
<div class="facetwp-facet facetwp-facet-xxx_search_training_type facetwp-type-search" data-name="xxx_search_training_type" data-type="search">
<span class="facetwp-search-wrap">
<i class="facetwp-btn"></i>
<input type="text" class="facetwp-search" value="" placeholder="Placehoder text here">
</span>
</div>
Suggested code:
<div class="facetwp-facet facetwp-facet-xxx_search_training_type facetwp-type-search" data-name="xxx_search_training_type" data-type="search">
<span class="facetwp-search-wrap">
<label for="some-unique-id">
<i class="facetwp-btn" aria-hidden="true"></i>
<span class="screen-reader-text">Search</span>
</label>
<input type="text" class="facetwp-search" value="" placeholder="Placehoder text here" id="some-unique-id">
</span>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment