1/**handles:twentyseventeen-skip-link-focus-fix**/ 2/** 3 * File skip-link-focus-fix.js. 4 * 5 * Helps with accessibility for keyboard only users. 6 * 7 * Learn more: https://git.io/vWdr2 8 */ 9(function() { 10 var isIe = /(trident|msie)/i.test( navigator.userAgent ); 11 12 if ( isIe && document.getElementById && window.addEventListener ) { 13 window.addEventListener( 'hashchange', function() { 14 var id = location.hash.substring( 1 ), 15 element; 16 17 if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) { 18 return; 19 } 20 21 element = document.getElementById( id ); 22 23 if ( element ) { 24 if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) { 25 element.tabIndex = -1; 26 } 27 28 element.focus(); 29 } 30 }, false ); 31 } 32})();
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.