From a496cb8be4dd1ccd4610e06f425153c76defc594 Mon Sep 17 00:00:00 2001 From: "Patrick H. Lauke" Date: Tue, 16 Feb 2016 14:16:27 +0000 Subject: [PATCH] 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 --- js/src/button.js | 3 +++ 1 file changed, 3 insertions(+) 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))