This commit is contained in:
Alexander Agnarson 2019-07-26 19:28:17 +02:00
parent 3225714dfa
commit 6992887a80
6 changed files with 56 additions and 5 deletions

View file

@ -807,3 +807,14 @@ if ( ! function_exists( 'curver_flexslider_gallery' ) ) {
}
add_action( 'wp_enqueue_scripts', 'curver_flexslider_gallery' );
/* Accessibility IE11 fix - https://git.io/vWdr2
/* ------------------------------------ */
function curver_skip_link_focus_fix() {
?>
<script>
/(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())},!1);
</script>
<?php
}
add_action( 'wp_print_footer_scripts', 'curver_skip_link_focus_fix' );