Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › tabindex and accessibility
This topic contains 4 replies, has 2 voices, and was last updated by DavidFHenry51 1 year, 5 months ago.
- AuthorPosts
- October 22, 2021 at 12:45 pm #35276
Hi,
Testing accessibility I get the following.
“Some elements have a [tabindex] value greater than 0”
I need to remove the tabindex to the make our pages accessible, can you let me know how?
David
October 22, 2021 at 1:34 pm #35280Hi,
The only way to remove the tab indexes is by editing the core plugin files. Please note, by removing those tab indexes the magnifier icon will not be selectable – those explicit tab indexes were used to make it more accessible.
The file you need to edit is
Best,wp-content/plugins/ajax-search-pro/includes/views/asp.shortcode.probox.php
lines 38 and 79. If you simply remove those attributes, it will resolve the issue.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
October 22, 2021 at 2:27 pm #35283Thanks, I’ve done that. Is there a way to override it?
October 22, 2021 at 3:16 pm #35284I’m afraid no override is possible for this file. You could use a custom script to remove all tabindexes though – although I am not exactly sure if that resolves it:
Best,add_action('wp_footer', 'wp_footer_asp_custom_remove_tabindex', 9999); function wp_footer_asp_custom_remove_tabindex() { ?> <script> (function($){ $('*[tabindex]').removeAttr('tabindex'); setTimeout(function(){ $('*[tabindex]').removeAttr('tabindex'); }, 1000); })(jQuery); </script> <?php }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
October 22, 2021 at 5:08 pm #35286This would save me time on future updates, but your right, I’m not sure I trust removing tabindex in the first place.
- AuthorPosts
You must be logged in to reply to this topic.