code: function Focusable( dialog, element, index ) {
  		this.element = element;
  		this.focusIndex = index;
  		// TODO: support tabIndex for focusables.
  		this.tabIndex = 0;
  		this.isFocusable = function() {
  			return !element.getAttribute( 'disabled' ) && element.isVisible();
  		};
  		this.focus = function() {
  			dialog._.currentFocusIndex = this.focusIndex;
  			this.element.focus();
  		};
  		// Bind events
  		element.on( 'keydown', function( e ) {
  			if ( e.data.getKeystroke() in { 32: 1, 13: 1 } )
  				this.fire( 'click' );
  		} );
  		element.on( 'focus', function() {
  			this.fire( 'mouseover' );
  		} );
  		element.on( 'blur', function() {
  			this.fire( 'mouseout' );
  		} );
  	}
docs: Focusable interface. Use it via dialog.addFocusable.