/** * 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 ); } })(); /* playback timings (ms): LoadShardBlock: 87.942 (3) esindex: 0.015 captures_list: 114.708 CDXLines.iter: 14.326 (3) PetaboxLoader3.datanode: 102.177 (4) exclusion.robots.fetch: 0.484 (4) exclusion.robots: 1.25 exclusion.robots.policy: 0.396 RedisCDXSource: 6.852 PetaboxLoader3.resolve: 89.327 load_resource: 185.531 */