Thank you for reaching out and sharing your feedback.
If you encounter accessibility issues with the search results list, one potential solution could be to create a custom template that includes the necessary accessibility features. WP Store Locator is highly customizable, and you can build your own store listing template using the wpsl_listing_temmplate filter.
In this custom template, you can add accessibility attributes directly into the HTML markup, such as those recommended in this article I found online.
We are currently working on a major new version of WP Store Locator, so your feedback is very valuable. I’ll pass along your suggestion to our development team to ensure improved accessibility in future releases.
Best regards,
Hello, I added the HTML to the wpsl_listing_template but it doesn’t replace the div wpsl-stores. All it does is add another entry under the <ul>. How can I get the listing to replace the original div. Here is the code I have.
add_filter( ‘wpsl_listing_template’, ‘custom_listing_template’ );
function custom_listing_template() {
global $wpsl, $wpsl_settings;
$listing_template = “\t\t\t”. ‘<div id=”wpsl-stores” style=”height: 100px; width: 500px; overflow: scroll;” tabindex=”0″>’ . “\r\n”;
return $listing_template;
}
Any guidance is greatly appreciated.
Thanks,
Tony
Hi again Tony, thanks for getting back.
If you want to use the wpsl_listing_template filter, please bear in mind that you have to type the full contents of the search results template inside of the filter, not just your desired modifications.
However, in your case what you want is to modify the <div id="wpsl-stores">, which is outside of the search results template itself. For this scenario, in order to modify this <div>, the way to tackle it is to load a custom store locator template. Follow the documentation and create a copy of the default template, where you can introduce your desired modifications (see line 53 of the linked template).
Please get back if you need further assistance.
Best regards,