From ce1a24170a453330ca08b295da453b375a086091 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Wed, 1 Dec 2021 16:05:38 -0500 Subject: [PATCH] fix missing anchor link aria-label --- assets/js/src/anchor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/js/src/anchor.js b/assets/js/src/anchor.js index 40b188c2..4957c95e 100644 --- a/assets/js/src/anchor.js +++ b/assets/js/src/anchor.js @@ -11,6 +11,7 @@ document.querySelectorAll(["div#content h2", "div#content h3", "div#content h4"] const anchor = document.createElement("a"); anchor.className = "anchorjs-link"; anchor.href = `#${h.getAttribute("id")}`; + anchor.ariaLabel = "Anchor"; // if this is a touchscreen, always show the "#" icon instead waiting for hover // NOTE: this is notoriously unreliable; see https://github.com/Modernizr/Modernizr/pull/2432