From cc3960cf2a29baf9e273039efe134576ef35bc77 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Thu, 27 Jan 2022 11:39:59 +1100 Subject: [PATCH] =?UTF-8?q?=E2=99=BF=EF=B8=8F=20Add=20ARIA=20labels=20to?= =?UTF-8?q?=20code=20copy=20buttons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/code.js | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/js/code.js b/assets/js/code.js index 5e88694e..2a2c270c 100644 --- a/assets/js/code.js +++ b/assets/js/code.js @@ -6,6 +6,7 @@ function createCopyButton(highlightDiv) { const button = document.createElement("button"); button.className = "copy-button"; button.type = "button"; + button.ariaLabel = copyText; button.innerText = copyText; button.addEventListener("click", () => copyCodeToClipboard(button, highlightDiv)); addCopyButtonToDom(button, highlightDiv);