Set role=presentation for header anchor links
This commit is contained in:
parent
bc280943f3
commit
605aaab747
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue