diff --git a/functions.php b/functions.php index 331f1926..d083326a 100644 --- a/functions.php +++ b/functions.php @@ -148,8 +148,6 @@ function _s_scripts() { wp_enqueue_script( '_s-navigation', get_template_directory_uri() . '/js/navigation.js', array(), _S_VERSION, true ); - wp_enqueue_script( '_s-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), _S_VERSION, true ); - if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } diff --git a/js/skip-link-focus-fix.js b/js/skip-link-focus-fix.js deleted file mode 100644 index bf9367e0..00000000 --- a/js/skip-link-focus-fix.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * File skip-link-focus-fix.js. - * - * Helps with accessibility for keyboard only users. - * - * Learn more: https://git.io/vWdr2 - */ -( function() { - var isIe = /(trident|msie)/i.test( navigator.userAgent ); - - if ( isIe && document.getElementById && window.addEventListener ) { - window.addEventListener( 'hashchange', function() { - var id = location.hash.substring( 1 ), - element; - - if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) { - return; - } - - element = document.getElementById( id ); - - if ( element ) { - if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) { - element.tabIndex = -1; - } - - element.focus(); - } - }, false ); - } -}() );