From: Hypolite Petovan Date: Mon, 15 Jul 2019 02:48:39 +0000 (-0400) Subject: [frio] Accessibility: enable keyboard action on visibility panels in compose page X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=496b02bdd25bc898d026c5e9ac033a2b42896456;p=friendica.git [frio] Accessibility: enable keyboard action on visibility panels in compose page --- diff --git a/view/templates/item/compose-footer.tpl b/view/templates/item/compose-footer.tpl index dc55cd9e4e..697be6fd10 100644 --- a/view/templates/item/compose-footer.tpl +++ b/view/templates/item/compose-footer.tpl @@ -45,6 +45,14 @@ e.stopPropagation() } }); + // Accessibility: enable space and enter to open a panel when focused + $('body').on('keyup', '[data-toggle="collapse"]:focus', function (e) { + if (e.key === ' ' || e.key === 'Enter') { + $(this).click(); + e.preventDefault(); + e.stopPropagation(); + } + }); $('#visibility-public-panel').on('show.bs.collapse', function() { $('#visibility-public').prop('checked', true);