Is there a WordPress setting or hook that I can use to disable the WordPress "Skip to Toolbar" accessibility feature?
I'm referring to the small popup that appears when tabbing through form controls:
I'd like for the default tabbing functionality to be restored (to tab through my fields without this skip to toolbar step in-between), preferably without having to change the tabindex
for any/all of the form elements on my page.
Is there a WordPress setting or hook that I can use to disable the WordPress "Skip to Toolbar" accessibility feature?
I'm referring to the small popup that appears when tabbing through form controls:
I'd like for the default tabbing functionality to be restored (to tab through my fields without this skip to toolbar step in-between), preferably without having to change the tabindex
for any/all of the form elements on my page.
It's not possible without JavaScript. The HTML for it is output in the WP_Admin_Bar
in a private and protected method with no filter.
You can remove them after the page has loaded with JS like so:
function wpse_287259_remove_skip_link() {
echo "<script>jQuery( '.screen-reader-shortcut' ).remove();</script>";
}
add_action( 'wp_after_admin_bar_render', 'wpse_287259_remove_skip_link' );
I hope it goes without saying that this is something you should do just for yourself and not do for unsuspecting users who might need or want the accessibility benefits.