A11Y: Trap focus on auth security modal (#18573)
This commit is contained in:
parent
c81763dcd8
commit
78044ad2aa
|
@ -14,6 +14,8 @@ export default Controller.extend(ModalFunctionality, {
|
||||||
).then((posts) => {
|
).then((posts) => {
|
||||||
if (posts.length > 0) {
|
if (posts.length > 0) {
|
||||||
this.set("latest_post", posts[0]);
|
this.set("latest_post", posts[0]);
|
||||||
|
// slightly hacky, but default d-modal focus gets reset
|
||||||
|
document.querySelector(".d-modal .modal-close")?.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue