From 605aaab747317b4dc62954bbc82d963f781cdf31 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 16 Sep 2019 18:11:57 -0400 Subject: [PATCH] Set role=presentation for header anchor links --- lib/markdown.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/markdown.ts b/lib/markdown.ts index 2d55648..04d2851 100644 --- a/lib/markdown.ts +++ b/lib/markdown.ts @@ -32,7 +32,8 @@ md.core.ruler.push("anchor", (state) => { attrs: [ ["class", "header-anchor"], ["href", "#" + slug], - ["aria-hidden", "true"] + ["aria-hidden", "true"], + ["role", "presentation"] ] }), Object.assign(new state.Token("html_block", "", 0), { content: token.markup }), @@ -46,4 +47,4 @@ md.core.ruler.push("anchor", (state) => { export function render(text: string): string { return md.render(text); -} \ No newline at end of file +}