Add main and nav landmarks

Signed-off-by: Alex Taker <a.taker@gmail.com>
This commit is contained in:
Alex Taker
2022-04-28 10:59:22 -04:00
parent 1001cd133d
commit ac19f82936
4 changed files with 10 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Added ARIA landmark <main> to Page component and added ARIA landmark <nav> to DesktopSidebar and Sidebar components
@@ -52,7 +52,7 @@ export function Page(props: Props) {
page: baseTheme.getPageTheme({ themeId }),
})}
>
<div className={classes.root}>{children}</div>
<main className={classes.root}>{children}</main>
</ThemeProvider>
);
}
@@ -189,7 +189,7 @@ const DesktopSidebar = (props: DesktopSidebarProps) => {
};
return (
<div style={{}}>
<nav style={{}}>
<A11ySkipSidebar />
<SidebarContext.Provider value={{ isOpen, setOpen }}>
<div
@@ -209,7 +209,7 @@ const DesktopSidebar = (props: DesktopSidebarProps) => {
</div>
</div>
</SidebarContext.Provider>
</div>
</nav>
);
};
@@ -140,7 +140,7 @@ const OverlayMenu = ({
<CloseIcon />
</IconButton>
</Box>
<Box>{children}</Box>
<Box component="nav">{children}</Box>
</Drawer>
);
};
@@ -226,6 +226,7 @@ export const MobileSidebar = (props: MobileSidebarProps) => {
<BottomNavigation
className={classes.root}
data-testid="mobile-sidebar-root"
component="nav"
>
{sidebarGroups}
</BottomNavigation>