From d27c29273640b2d67a7af1fa9c6410077c7cbe9f Mon Sep 17 00:00:00 2001
From: Andrew <80933354+ndrooo@users.noreply.github.com>
Date: Tue, 13 Aug 2024 03:06:19 +0000
Subject: [PATCH] feat: Mark the external link icon as aria-hidden (#1346)

---
 quartz/components/TableOfContents.tsx |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/quartz/components/TableOfContents.tsx b/quartz/components/TableOfContents.tsx
index 77ff0eb..f3d8d7f 100644
--- a/quartz/components/TableOfContents.tsx
+++ b/quartz/components/TableOfContents.tsx
@@ -26,7 +26,13 @@
 
   return (
     <div class={classNames(displayClass, "toc")}>
-      <button type="button" id="toc" class={fileData.collapseToc ? "collapsed" : ""}>
+      <button
+        type="button"
+        id="toc"
+        class={fileData.collapseToc ? "collapsed" : ""}
+        aria-controls="toc-content"
+        aria-expanded={!fileData.collapseToc}
+      >
         <h3>{i18n(cfg.locale).components.tableOfContents.title}</h3>
         <svg
           xmlns="http://www.w3.org/2000/svg"

--
Gitblit v1.10.0