tabindex and accessibility

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 DavidFHenry51 2 years, 5 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #35276
    DavidFHenry51
    DavidFHenry51
    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 Marcinko
    Ernest 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #35283
    DavidFHenry51
    DavidFHenry51
    Participant

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

    #35284
    Ernest Marcinko
    Ernest 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
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #35286
    DavidFHenry51
    DavidFHenry51
    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.