mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-13 13:03:13 +00:00
Improve accessibility of clipboard button
This commit is contained in:
@@ -15,6 +15,7 @@ const addCopyButtons = (clipboard) => {
|
|||||||
const button = document.createElement('button')
|
const button = document.createElement('button')
|
||||||
button.className = 'clipboard-button'
|
button.className = 'clipboard-button'
|
||||||
button.setAttribute('data-toast-target', 'toast-copied-code-message')
|
button.setAttribute('data-toast-target', 'toast-copied-code-message')
|
||||||
|
button.setAttribute('aria-label', '{{ T "copyToClipboard" }}')
|
||||||
button.type = 'button'
|
button.type = 'button'
|
||||||
button.innerHTML = svgCopy
|
button.innerHTML = svgCopy
|
||||||
button.addEventListener('click', () => {
|
button.addEventListener('click', () => {
|
||||||
|
Reference in New Issue
Block a user