aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/templates/page/page-layout.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-15 19:08:58 +0200
committerArmand Philippot <git@armandphilippot.com>2022-05-15 19:08:58 +0200
commit056ed0d5f050158cebad689099214b164539899a (patch)
tree8e28a82386a785568a7a655bf4d1213096b82589 /src/components/templates/page/page-layout.tsx
parentc95cce04393080a52a54191cff7be8fec68af4b0 (diff)
chore: improve accessibility
Diffstat (limited to 'src/components/templates/page/page-layout.tsx')
-rw-r--r--src/components/templates/page/page-layout.tsx18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/components/templates/page/page-layout.tsx b/src/components/templates/page/page-layout.tsx
index 045b8c1..4e4ff00 100644
--- a/src/components/templates/page/page-layout.tsx
+++ b/src/components/templates/page/page-layout.tsx
@@ -185,7 +185,14 @@ const PageLayout: FC<PageLayoutProps> = ({
className={styles.header}
/>
{withToC && (
- <Sidebar className={`${styles.sidebar} ${styles['sidebar--first']}`}>
+ <Sidebar
+ className={`${styles.sidebar} ${styles['sidebar--first']}`}
+ aria-label={intl.formatMessage({
+ defaultMessage: 'Table of contents sidebar',
+ id: 'Q+1GbT',
+ description: 'PageLayout: accessible name for ToC sidebar',
+ })}
+ >
{isMounted && bodyRef.current && (
<TableOfContents wrapper={bodyRef.current} />
)}
@@ -203,7 +210,14 @@ const PageLayout: FC<PageLayoutProps> = ({
</div>
)}
<PageFooter meta={footerMeta} className={styles.footer} />
- <Sidebar className={`${styles.sidebar} ${styles['sidebar--last']}`}>
+ <Sidebar
+ className={`${styles.sidebar} ${styles['sidebar--last']}`}
+ aria-label={intl.formatMessage({
+ defaultMessage: 'Sidebar',
+ id: 'c556Qo',
+ description: 'PageLayout: accessible name for the sidebar',
+ })}
+ >
{widgets}
</Sidebar>
{hasCommentsSection && (