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);