Keep focus visible for menu buttons when menu is open and then closed

The `[aria-expanded="true"]` keeps the button highlighted while the menu
is open.

The `:focus-visible` ensures the focus stays visible when the menu is
closed. This is normally applied by the A11yController, but that gets
removed when MUI programatically moves the focus back when the menu is
closed.
This commit is contained in:
Harrison Healey
2025-07-11 16:13:42 -04:00
parent a9b4373c8a
commit 7e396b1ac0
2 changed files with 14 additions and 0 deletions
@@ -156,4 +156,11 @@
.Avatars {
margin-right: 10px;
}
// Remove the focus-visible case when MM-62778 is completed
.btn:focus-visible,
.btn[aria-expanded="true"] {
border-radius: 4px;
box-shadow: 0 0 1px 3px rgba(var(--link-color-rgb), 0.5), 0 0 0 1px var(--link-color);
}
}
@@ -56,6 +56,13 @@
font-weight: 400;
}
}
// Remove the focus-visible case when MM-62778 is completed
.btn:focus-visible,
.btn[aria-expanded="true"] {
border-radius: 4px;
box-shadow: 0 0 1px 3px rgba(var(--link-color-rgb), 0.5), 0 0 0 1px var(--link-color);
}
}
.ThreadViewer {