client/lib/accessible-focus/index.js
function accessibleFocus() {
	document.addEventListener( 'keydown', function( event ) {
		if ( keyboardNavigation ) {
			return;
		}
		if ( keyboardNavigationKeycodes.indexOf( event.keyCode ) !== -1 ) {
			keyboardNavigation = true;
			document.documentElement.classList.add( 'accessible-focus' );
		}
	} );
	document.addEventListener( 'mouseup', function() {
		if ( ! keyboardNavigation ) {
			return;
		}
		keyboardNavigation = false;
		document.documentElement.classList.remove( 'accessible-focus' );
	} );
}
function accessibleFocus() {
	document.addEventListener( 'keydown', function( event ) {
		if ( keyboardNavigation ) {
			return;
		}
		if ( keyboardNavigationKeycodes.indexOf( event.keyCode ) !== -1 ) {
			keyboardNavigation = true;
			document.documentElement.classList.add( 'accessible-focus' );
		}
	} );
	document.addEventListener( 'mouseup', function() {
		if ( ! keyboardNavigation ) {
			return;
		}
		keyboardNavigation = false;
		document.documentElement.classList.remove( 'accessible-focus' );
	} );
}
function accessibleFocus ( ) { document . addEventListener ( 'keydown' , function ( event ) { if ( keyboardNavigation ) { return ; } if ( keyboardNavigationKeycodes . indexOf ( event . keyCode ) !== - 1 ) { keyboardNavigation = true ; document . documentElement . classList . add ( 'accessible-focus' ) ; } } ) ; document . addEventListener ( 'mouseup' , function ( ) { if ( ! keyboardNavigation ) { return ; } keyboardNavigation = false ; document . documentElement . classList . remove ( 'accessible-focus' ) ; } ) ; }
keyCodes for tab, space, left, up, right, down respectively
keyCodes for tab space left up right down respectively