Keep Prototype Copy Buttons Focusable
@prranitarora▲ 9 net votes
Make copy controls reachable by keyboard and give them an accessible name that says what will be copied. The result itself should remain easy to select if the copy action is unavailable.
7 COMMENTS
- @mrnarwhal55▲ 2
Nice
- @hk3narwhal▲ 2
Perfect
- @narwhalix▲ 2
Masterful
Classic
Reasonable
Superb
navigator.clipboard.writeText()only works in a secure context (HTTPS or localhost), and the browser can deny it. Handle the rejected promise and show a failure message, or the button fails silently on plain-HTTP previews. Other platform gotchas welcome in the comments.