1/** 2 * File skip-link-focus-fix.js. 3 * 4 * Helps with accessibility for keyboard only users. 5 * 6 * Learn more: https://git.io/vWdr2 7 */ 8(function() { 9 'use strict'; 10 var isIe = /(trident|msie)/i.test( navigator.userAgent ); 11 if ( isIe && document.getElementById && window.addEventListener ) { 12 window.addEventListener( 'hashchange', function() { 13 var id = location.hash.substring( 1 ), 14 element; 15 if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) { 16 return; 17 } 18 element = document.getElementById( id ); 19 if ( element ) { 20 if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) { 21 element.tabIndex = -1; 22 } 23 element.focus(); 24 } 25 }, false ); 26 } 27})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.