mirror of https://github.com/jpanther/congo.git
♿️ Add ARIA labels to code copy buttons
parent
734fa6e827
commit
cc3960cf2a
|
@ -6,6 +6,7 @@ function createCopyButton(highlightDiv) {
|
||||||
const button = document.createElement("button");
|
const button = document.createElement("button");
|
||||||
button.className = "copy-button";
|
button.className = "copy-button";
|
||||||
button.type = "button";
|
button.type = "button";
|
||||||
|
button.ariaLabel = copyText;
|
||||||
button.innerText = copyText;
|
button.innerText = copyText;
|
||||||
button.addEventListener("click", () => copyCodeToClipboard(button, highlightDiv));
|
button.addEventListener("click", () => copyCodeToClipboard(button, highlightDiv));
|
||||||
addCopyButtonToDom(button, highlightDiv);
|
addCopyButtonToDom(button, highlightDiv);
|
||||||
|
|
Loading…
Reference in New Issue