fixed Chrome accessibility error
This commit is contained in:
parent
f181442c67
commit
ba79c685e8
|
|
@ -513,7 +513,7 @@
|
|||
</section>
|
||||
|
||||
<div id="drawer-backdrop" class="drawer-backdrop" hidden></div>
|
||||
<aside id="account-drawer" class="account-drawer" aria-hidden="true">
|
||||
<aside id="account-drawer" class="account-drawer" aria-hidden="true" inert>
|
||||
<header class="drawer-header">
|
||||
<div>
|
||||
<strong>Wallets</strong>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -510,7 +510,7 @@
|
|||
</section>
|
||||
|
||||
<div id="drawer-backdrop" class="drawer-backdrop" hidden></div>
|
||||
<aside id="account-drawer" class="account-drawer" aria-hidden="true">
|
||||
<aside id="account-drawer" class="account-drawer" aria-hidden="true" inert>
|
||||
<header class="drawer-header">
|
||||
<div>
|
||||
<strong>Wallets</strong>
|
||||
|
|
|
|||
|
|
@ -1020,9 +1020,20 @@ function renderKnownAddresses(status: WalletStatus): void {
|
|||
function setAccountDrawer(open: boolean): void {
|
||||
const drawer = byId("account-drawer");
|
||||
const backdrop = byId("drawer-backdrop");
|
||||
const trigger = byId("account-menu-button");
|
||||
drawer.classList.toggle("open", open);
|
||||
drawer.setAttribute("aria-hidden", String(!open));
|
||||
const trigger = byId<HTMLButtonElement>("account-menu-button");
|
||||
|
||||
if (open) {
|
||||
drawer.inert = false;
|
||||
drawer.setAttribute("aria-hidden", "false");
|
||||
drawer.classList.add("open");
|
||||
byId<HTMLButtonElement>("close-account-drawer").focus();
|
||||
} else {
|
||||
if (drawer.contains(document.activeElement)) trigger.focus();
|
||||
drawer.classList.remove("open");
|
||||
drawer.setAttribute("aria-hidden", "true");
|
||||
drawer.inert = true;
|
||||
}
|
||||
|
||||
trigger.setAttribute("aria-expanded", String(open));
|
||||
backdrop.hidden = !open;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue