fixed Chrome accessibility error

This commit is contained in:
viraladmin 2026-08-03 00:05:16 -06:00
parent f181442c67
commit ba79c685e8
4 changed files with 21 additions and 10 deletions

View File

@ -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

View File

@ -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>

View File

@ -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;
}