Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › SiteImprove found issues
This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko 1 year, 2 months ago.
- AuthorPosts
- January 12, 2022 at 4:47 pm #36250
Hello, I am experiencing two issues on my site which relate to the Ajax Search Pro plugin that we use. SiteImprove (an accessibility tool) picked up on these two & my developer noted these relate to the plugin:
1. Scrollable element is not keyboard accessible – I can see the Ajax Search Pro plugin applying multiple positive value tabindex attributes (this is a bad practice from accessibility point of view), which mess up the natural keyboard focus flow. That may be the cause of the issue.
2. Skip to main content link is missing – The skip links are outputted perfectly fine by the theme and should be the first focusable element by default. The problem is related to aforementioned positive value of tabindex attributes applied by Ajax Search Pro plugin which causes skip links to not be the first focusable element.
Could you please help me resolve these? Thank you.
January 13, 2022 at 12:30 pm #36253Hi,
Thank you for the details, it helps a lot!
I think the only possible solution here is to use a custom script to remove the tab indexes from the search input. Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
add_action('wp_footer', 'asp_custom_footer_script', 999); function asp_custom_footer_script() { ?> <script> jQuery(function($){ $('.asp_w *[tabindex]').removeAttr('tabindex') }); </script> <?php }
I will try to figure out a better way of handling this in the upcoming release.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.