mirror of
https://github.com/TrezOne/congo-hindi-gujarati.git
synced 2026-07-19 17:13:02 -04:00
♿️ Add ARIA labels to code copy buttons
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user