Skip to content

Commit

Permalink
fix(a11y): add title to copy code button (#1437)
Browse files Browse the repository at this point in the history
Co-authored-by: Divyansh Singh <[email protected]>
  • Loading branch information
userquin and brc-dd authored Oct 5, 2022
1 parent 88fb940 commit f79bb78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/markdown/plugins/preWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const preWrapperPlugin = (md: MarkdownIt) => {
const [tokens, idx] = args
const lang = tokens[idx].info.trim().replace(/-vue$/, '')
const rawCode = fence(...args)
return `<div class="language-${lang}"><button class="copy"></button><span class="lang">${
return `<div class="language-${lang}"><button title="Copy Code" class="copy"></button><span class="lang">${
lang === 'vue-html' ? 'template' : lang
}</span>${rawCode}</div>`
}
Expand Down

0 comments on commit f79bb78

Please sign in to comment.