From: Patrick H. Lauke Date: Tue, 16 Feb 2016 14:16:27 +0000 (+0000) Subject: Focus (visually hidden) input radio/checkbox X-Git-Tag: v4.0.0-alpha.3~237^2~10^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F19222%2Fhead;p=thirdparty%2Fbootstrap.git Focus (visually hidden) input radio/checkbox This allows for keyboard navigation (e.g. arrow keys left/right to trigger different radio buttons) following an initial mouse click interaction --- diff --git a/js/src/button.js b/js/src/button.js index 3144a3f101..adcf4c9286 100644 --- a/js/src/button.js +++ b/js/src/button.js @@ -92,7 +92,10 @@ const Button = (($) => { input.checked = !$(this._element).hasClass(ClassName.ACTIVE) $(this._element).trigger('change') } + + $(input).trigger('focus') } + } else { this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE))