]> git.ardis.lu - css-for-line-clamp-ellipsis/commitdiff
Add aria attributes to copy button
authorArdis Lu <ardisglu@gmail.com>
Sat, 7 Oct 2023 22:31:14 +0000 (15:31 -0700)
committerArdis Lu <ardisglu@gmail.com>
Sat, 7 Oct 2023 22:31:14 +0000 (15:31 -0700)
index.html

index d513f982c12c7ec4292eb0561ebe19ab7ffbdbac..89bc6710f4df830e36c07ff14fcd7fd7ddee9a6e 100644 (file)
@@ -381,7 +381,7 @@ new ResizeObserver(debounce(() => {
         <path d="m15 10-4 4 4 4"/>`;
     const checkSVG = '<polyline points="20 6 9 17 4 12"/>';
     document.querySelectorAll('pre').forEach(pre => {
-      pre.insertAdjacentHTML('beforeend', `<button><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">${clipboardSVG}</svg></button>`);
+      pre.insertAdjacentHTML('beforeend', `<button aria-label="Copy"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">${clipboardSVG}</svg></button>`);
     });
 
     function copy(event) {
This page took 0.046509 seconds and 4 git commands to generate.