Code block copy button has no visible indicator on keyboard focus #12118
Labels
accessibility
bug
Something isn't working
html
Issues with HTML and related web technology (html/css/scss)
themes
Related to HTML theming or any other style related issue (like highlight-style)
Milestone
Bug description
Minor accessibility issue: when navigating to the Copy button within a code block using a keyboard, there's no visual indicator that the button has been focused.
In Quarto 1.6.39, the copy button doesn't appear at all. Here, I have keyboard focus on the copy button:
https://docs.posit.co/connect/2025.01.0/admin/r/#disabling-r-support
In the current Quarto docs, it seems that the Copy button is now always visible, which is a nice change. I'm not sure if that was a change in a later Quarto version or if this is a config option somewhere.
However, there is still no visible indicator that you have focus on the Copy button. Here I have keyboard focus on the first copy button, but it's visibly indistinguishable:
https://quarto.org/docs/output-formats/html-code.html#hiding-code
Steps to reproduce
Actual behavior
There is no visual indicator that the button is focused. The copy button will still be operable though - you can still use Enter/Space to click it.
Expected behavior
There should be a visual indicator that the copy button is focused. Ideally something that's not purely a change to color (which I've seen in doc sites before and has issues). I think the usual button focus outline is pretty common to see on doc sites. For example, on this MkDocs Material site: https://docs.posit.co/rspm/2024.11.0/admin/getting-started/installation/installing-ppm/#initial-configuration
Your environment
No response
Quarto check output
The text was updated successfully, but these errors were encountered: