From 23db974180f74917bab1fcd59985604b7192ff13 Mon Sep 17 00:00:00 2001 From: ndrooo Date: Sat, 10 Aug 2024 11:35:00 -0400 Subject: [PATCH] `aria-label` on theme svgs so their accessible labels are included in button content --- quartz/components/Darkmode.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quartz/components/Darkmode.tsx b/quartz/components/Darkmode.tsx index 6a1610c73..f64aad636 100644 --- a/quartz/components/Darkmode.tsx +++ b/quartz/components/Darkmode.tsx @@ -20,6 +20,7 @@ const Darkmode: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) viewBox="0 0 35 35" style="enable-background:new 0 0 35 35" xmlSpace="preserve" + aria-label={i18n(cfg.locale).components.themeToggle.darkMode} > {i18n(cfg.locale).components.themeToggle.darkMode} @@ -34,6 +35,7 @@ const Darkmode: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) viewBox="0 0 100 100" style="enable-background:new 0 0 100 100" xmlSpace="preserve" + aria-label={i18n(cfg.locale).components.themeToggle.lightMode} > {i18n(cfg.locale).components.themeToggle.lightMode}