fix(a11y): recover mobile drawer focus after visible transition
This commit is contained in:
@@ -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={{
|
||||
|
||||
Reference in New Issue
Block a user