From d8963e253f3ff333532516b7ce020b6ae6b94436 Mon Sep 17 00:00:00 2001 From: Robin van Zanten <38441984+RCVZ@users.noreply.github.com> Date: Fri, 30 Apr 2021 14:01:18 +0200 Subject: [PATCH] feat(project): add sidebar aria labels --- .../Layout/__snapshots__/Layout.test.tsx.snap | 17 +++++++++++++---- src/components/SideBar/SideBar.tsx | 8 ++++---- .../SideBar/__snapshots__/SideBar.test.tsx.snap | 12 ++++++++---- src/icons/createIcon.tsx | 2 ++ 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/components/Layout/__snapshots__/Layout.test.tsx.snap b/src/components/Layout/__snapshots__/Layout.test.tsx.snap index e723a3355..5b2a3d8e9 100644 --- a/src/components/Layout/__snapshots__/Layout.test.tsx.snap +++ b/src/components/Layout/__snapshots__/Layout.test.tsx.snap @@ -10,10 +10,14 @@ exports[` renders layout 1`] = ` class="container" > diff --git a/src/components/SideBar/SideBar.tsx b/src/components/SideBar/SideBar.tsx index 19a13a28a..0c3094f45 100644 --- a/src/components/SideBar/SideBar.tsx +++ b/src/components/SideBar/SideBar.tsx @@ -26,15 +26,15 @@ const SideBar: React.FC = ({ sideBarOpen, closeSideBar }) => { })} onClick={closeSideBar} > - -
+
+ ); diff --git a/src/components/SideBar/__snapshots__/SideBar.test.tsx.snap b/src/components/SideBar/__snapshots__/SideBar.test.tsx.snap index 76d3da0de..568819bca 100644 --- a/src/components/SideBar/__snapshots__/SideBar.test.tsx.snap +++ b/src/components/SideBar/__snapshots__/SideBar.test.tsx.snap @@ -8,11 +8,15 @@ exports[` renders sideBar 1`] = ` `; diff --git a/src/icons/createIcon.tsx b/src/icons/createIcon.tsx index ed12949f6..8575831f9 100644 --- a/src/icons/createIcon.tsx +++ b/src/icons/createIcon.tsx @@ -16,6 +16,8 @@ export default (viewBox: string, icon: JSX.Element) => ({ className={classNames(styles.icon, className)} viewBox={viewBox} {...props} + focusable="false" + aria-hidden="true" xmlns="http://www.w3.org/2000/svg" > {icon}