fix(a11y): recover mobile drawer focus after visible transition

This commit is contained in:
cesnimda
2026-10-10 22:02:53 +02:00
parent 0401bc36ea
commit b377f0f62f
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -615,7 +615,7 @@ export default function AppShell({
slotProps={{
paper: { "aria-label": t("navigation") },
transition: { onEntered: (node: HTMLElement) => {
if (node === document.activeElement) node.querySelector<HTMLElement>('[role="button"]')?.focus();
if (node === document.activeElement || !node.contains(document.activeElement)) node.querySelector<HTMLElement>('[role="button"]')?.focus();
} },
}}
sx={{