1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-02 16:38:37 +00:00

Fix accessibility issues in modal component

* Fix modal aria role
* Trap focusing with tab / shift+tab inside the modal
* Restore keyboard focus when closing modal
* Automatically move keyboard focus to first focusable element unless specified otherwise
* Keyboard shortcut help modal: move keyboard focus to modal title
* Keyboard shortcut help modal: change close control from link to button
This commit is contained in:
Tuukka Ojala 2023-07-02 23:28:02 +03:00 committed by Frédéric Guillot
parent bfb4fc1c36
commit 29a06511a9
3 changed files with 77 additions and 6 deletions

View file

@ -94,7 +94,7 @@ function setFocusToSearchInput(event) {
function showKeyboardShortcuts() {
let template = document.getElementById("keyboard-shortcuts");
if (template !== null) {
ModalHandler.open(template.content);
ModalHandler.open(template.content, "dialog-title");
}
}