From 056ed0d5f050158cebad689099214b164539899a Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Sun, 15 May 2022 19:08:58 +0200
Subject: chore: improve accessibility

---
 src/components/templates/page/page-layout.tsx | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

(limited to 'src/components/templates/page/page-layout.tsx')

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 && (
-- 
cgit v1.2.3

