aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/atoms/layout/sidebar.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/atoms/layout/sidebar.tsx
parentc95cce04393080a52a54191cff7be8fec68af4b0 (diff)
chore: improve accessibility
Diffstat (limited to 'src/components/atoms/layout/sidebar.tsx')
-rw-r--r--src/components/atoms/layout/sidebar.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/atoms/layout/sidebar.tsx b/src/components/atoms/layout/sidebar.tsx
index d13cc0d..d86af37 100644
--- a/src/components/atoms/layout/sidebar.tsx
+++ b/src/components/atoms/layout/sidebar.tsx
@@ -3,6 +3,10 @@ import styles from './sidebar.module.scss';
export type SidebarProps = {
/**
+ * An accessible name for the sidebar.
+ */
+ 'aria-label'?: string;
+ /**
* The sidebar body.
*/
children: ReactNode;
@@ -17,9 +21,9 @@ export type SidebarProps = {
*
* Render an aside element.
*/
-const Sidebar: FC<SidebarProps> = ({ children, className = '' }) => {
+const Sidebar: FC<SidebarProps> = ({ children, className = '', ...props }) => {
return (
- <aside className={`${styles.wrapper} ${className}`}>
+ <aside className={`${styles.wrapper} ${className}`} {...props}>
<div className={styles.body}>{children}</div>
</aside>
);