mirror of
https://github.com/friendica/friendica
synced 2024-11-18 05:43:42 +00:00
[frio] Accessibility: enable keyboard action on visibility panels in compose page
This commit is contained in:
parent
4f4b538bcf
commit
496b02bdd2
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue