perf(a11y): add aria-hidden to line numbers wrapper (#1675)

pull/1591/head
Sam Chen 2 years ago committed by GitHub
parent 30924f5010
commit 4c5a892d77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,7 +17,7 @@ export const lineNumberPlugin = (md: MarkdownIt) => {
.map((line, index) => `<span class="line-number">${index + 1}</span><br>`)
.join('')
const lineNumbersWrapperCode = `<div class="line-numbers-wrapper">${lineNumbersCode}</div>`
const lineNumbersWrapperCode = `<div class="line-numbers-wrapper" aria-hidden="true">${lineNumbersCode}</div>`
const finalCode = rawCode
.replace(/<\/div>$/, `${lineNumbersWrapperCode}</div>`)

Loading…
Cancel
Save