fix: Menus with accessory in-front of label cannot be navigated with keyboard letters

fix: Flash of outline state when focusing menu item with keyboard
This commit is contained in:
Tom Moor
2024-04-11 20:51:56 -04:00
parent 9c179fdd30
commit 2e427a1e83
4 changed files with 13 additions and 6 deletions

View File

@@ -126,7 +126,7 @@ function Template({ items, actions, context, ...menu }: Props) {
item.type !== "separator" &&
item.type !== "heading"
) {
item.icon = item.icon || <MenuIconWrapper />;
item.icon = item.icon || <MenuIconWrapper aria-hidden />;
}
if (item.type === "route") {
@@ -220,7 +220,7 @@ function Title({
}) {
return (
<Flex align="center">
{icon && <MenuIconWrapper>{icon}</MenuIconWrapper>}
{icon && <MenuIconWrapper aria-hidden>{icon}</MenuIconWrapper>}
{title}
</Flex>
);