A11Y: Trap focus on auth security modal (#18573)

This commit is contained in:
Penar Musaraj 2022-10-13 16:16:22 -04:00 committed by GitHub
parent c81763dcd8
commit 78044ad2aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,8 @@ export default Controller.extend(ModalFunctionality, {
).then((posts) => {
if (posts.length > 0) {
this.set("latest_post", posts[0]);
// slightly hacky, but default d-modal focus gets reset
document.querySelector(".d-modal .modal-close")?.focus();
}
});
},