2 * Makes "skip to content" link work correctly in IE9, Chrome, and Opera
3 * for better accessibility.
5 * @link http://www.nczonline.net/blog/2013/01/15/fixing-skip-to-content-links/
9 var ua = navigator.userAgent.toLowerCase();
11 if ( ( ua.indexOf( 'webkit' ) > -1 || ua.indexOf( 'opera' ) > -1 || ua.indexOf( 'msie' ) > -1 ) &&
12 document.getElementById && window.addEventListener ) {
14 window.addEventListener( 'hashchange', function() {
15 var element = document.getElementById( location.hash.substring( 1 ) );
18 if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.nodeName ) ) {
19 element.tabIndex = -1;