Currently the only "success indicator" when the code-copy button is pressed is that the icon changes to a check. 

Unpressed:
``` html
<button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button>
```

Becomes the below for a short duration after being pressed:
``` html
<button title="Copy to Clipboard" class="code-copy-button code-copy-button-checked"><i class="bi"></i></button>
```

The background image changes from a clipboard to a checkmark, but there is no accessible change to indicate that anything happened.

The same styling is used in the Bootstrap Icon documentation, except the `title` of the button changes on click to indicate success to a screen reader (see, e.g. in the [icon-accessibility section](https://icons.getbootstrap.com/#accessibility)):

Initial state:
``` html
<button type="button" class="btn-clipboard" title="Copy to clipboard">
<svg class="bi" width="1em" height="1em" fill="currentColor">
<use xlink:href="/bootstrap-icons.svg#clipboard"></use>
</svg>
</button>
```

On click:
``` html
<button type="button" class="btn-clipboard" title="Copied!">
<svg class="bi" width="1em" height="1em" fill="currentColor">
<use xlink:href="/bootstrap-icons.svg#check2"></use>
</svg>
</button>
```

I'm not sure whether or not this is the ideal solution, but it seems like it'd be feasible to do something of the like within the function below to change the title:
https://github.com/quarto-dev/quarto-cli/blob/ce33899ca2118f383cac1ed7d07c1c97155d5802/src/resources/formats/html/templates/quarto-html.ejs#L149-L161

Let me know how/if I can help!

**Edit** The code-copy button interface in GitHub issues (e.g. see the code chunks above) might be another option (a "Copied" success indicator appears to the left of the button after click)—the actual `aria-label` (as opposed to just a `title`) of the button changes to "Copied!", which would actually be _more_ accessible, since support for `title` isn't consistent across assistive technologies.
dragonstyle
2022-04-17T11:46:42Z
batpigandme
closed
Code-copy button needs text or programmatically-determinable success indicator (a11y issue)
https://github.com/quarto-dev/quarto-cli/issues/667