This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

tabindex and accessibility

Home Forums Product Support Forums Ajax Search Pro for WordPress Support tabindex and accessibility

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #35276
    DavidFHenry51DavidFHenry51
    Participant

    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

    #35280
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    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 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.

    #35283
    DavidFHenry51DavidFHenry51
    Participant

    Thanks, I’ve done that. Is there a way to override it?

    #35284
    Ernest MarcinkoErnest Marcinko
    Keymaster

    I’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:

    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
    }
    #35286
    DavidFHenry51DavidFHenry51
    Participant

    This would save me time on future updates, but your right, I’m not sure I trust removing tabindex in the first place.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.