From a9427a09abdf7ce9aaeae7c7190f90c8f2e5ef52 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 15 Feb 2021 14:08:13 +0100 Subject: Improve README, introductory vignette and some other docs Also bump version to 1.0.3. --- .../accessible-code-block-0.0.1/empty-anchor.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/articles/mkin_files/accessible-code-block-0.0.1/empty-anchor.js (limited to 'docs/articles/mkin_files/accessible-code-block-0.0.1/empty-anchor.js') diff --git a/docs/articles/mkin_files/accessible-code-block-0.0.1/empty-anchor.js b/docs/articles/mkin_files/accessible-code-block-0.0.1/empty-anchor.js new file mode 100644 index 00000000..ca349fd6 --- /dev/null +++ b/docs/articles/mkin_files/accessible-code-block-0.0.1/empty-anchor.js @@ -0,0 +1,15 @@ +// Hide empty tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) --> +// v0.0.1 +// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020. + +document.addEventListener('DOMContentLoaded', function() { + const codeList = document.getElementsByClassName("sourceCode"); + for (var i = 0; i < codeList.length; i++) { + var linkList = codeList[i].getElementsByTagName('a'); + for (var j = 0; j < linkList.length; j++) { + if (linkList[j].innerHTML === "") { + linkList[j].setAttribute('aria-hidden', 'true'); + } + } + } +}); -- cgit v1.2.1