Skip to content

Commit 1e39d17

Browse files
committed
✨(frontend) improve accessibility by adding landmark roles to layout
landmark roles help assistive tech users navigate quickly across the page Signed-off-by: Cyril <[email protected]>
1 parent ecd2f97 commit 1e39d17

File tree

6 files changed

+11
-1
lines changed

6 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to
1212

1313
- ♿(frontend) improve accessibility:
1414
- #1354
15+
- ♿ improve accessibility by adding landmark roles to layout #1394
1516

1617
### Fixed
1718

src/frontend/apps/impress/src/features/footer/Footer.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ export const Footer = () => {
5656
}
5757

5858
return (
59-
<Box $position="relative" as="footer" className="--docs--footer">
59+
<Box
60+
$position="relative"
61+
as="footer"
62+
role="contentinfo"
63+
className="--docs--footer"
64+
>
6065
<BlueStripe />
6166
<Box $padding={{ top: 'large', horizontal: 'big', bottom: 'small' }}>
6267
<Box

src/frontend/apps/impress/src/features/header/components/Header.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const Header = () => {
2222
return (
2323
<Box
2424
as="header"
25+
role="banner"
2526
$css={css`
2627
position: fixed;
2728
top: 0;

src/frontend/apps/impress/src/features/home/components/HomeContent.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export function HomeContent() {
3535
return (
3636
<Box
3737
as="main"
38+
role="main"
3839
className="--docs--home-content"
3940
aria-label={t('Main content')}
4041
>

src/frontend/apps/impress/src/layouts/MainLayout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export function MainLayout({
3434
<LeftPanel />
3535
<Box
3636
as="main"
37+
role="main"
3738
aria-label={t('Main content')}
3839
id={MAIN_LAYOUT_ID}
3940
$align="center"

src/frontend/apps/impress/src/layouts/PageLayout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export function PageLayout({
2626
<Header />
2727
<Box
2828
as="main"
29+
role="main"
2930
$width="100%"
3031
$css="flex-grow:1;"
3132
aria-label={t('Main content')}

0 commit comments

Comments
 (0)