-
Notifications
You must be signed in to change notification settings - Fork 13
Move CopyToClipboard to its own component #1845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
I want to look at some accessibility affordances we might add to the button / test it out with a screenreader. Will update tomorrow when ready for review. |
| className="text-tertiary hover:text-accent-secondary" | ||
| onClick={handleCopy} | ||
| type="button" | ||
| aria-label={hasCopied ? 'Copied' : ariaLabel} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this with VoiceOver on Mac, and it reads the appropriate text in the appropriate state, and live-updates when it changes.
oxidecomputer/console@1802c28...007cfe6 * [007cfe67](oxidecomputer/console@007cfe67) oxidecomputer/console#1858 * [d536bd97](oxidecomputer/console@d536bd97) oxidecomputer/console#1857 * [bfd59c0d](oxidecomputer/console@bfd59c0d) oxidecomputer/console#1845 * [ba335d45](oxidecomputer/console@ba335d45) oxidecomputer/console#1853 * [5556d881](oxidecomputer/console@5556d881) update mockServiceWorker.js * [48da3e1c](oxidecomputer/console@48da3e1c) oxidecomputer/console#1841 * [a7532d9a](oxidecomputer/console@a7532d9a) oxidecomputer/console#1842
oxidecomputer/console@1802c28...007cfe6 * [007cfe67](oxidecomputer/console@007cfe67) oxidecomputer/console#1858 * [d536bd97](oxidecomputer/console@d536bd97) oxidecomputer/console#1857 * [bfd59c0d](oxidecomputer/console@bfd59c0d) oxidecomputer/console#1845 * [ba335d45](oxidecomputer/console@ba335d45) oxidecomputer/console#1853 * [5556d881](oxidecomputer/console@5556d881) update mockServiceWorker.js * [48da3e1c](oxidecomputer/console@48da3e1c) oxidecomputer/console#1841 * [a7532d9a](oxidecomputer/console@a7532d9a) oxidecomputer/console#1842
This is a small refactor, pulling the CopyToClipboard functionality out of Truncate and into its own component so we can re-use it independently, as needed.
There's no change to the current interaction, but here's a recording of it in situ:
https://github.com/oxidecomputer/console/assets/22547/ea7f7a9a-c0cc-44b5-9d67-1b1b29308dfb
[Eh; thought that would just embed the .mov. Sorry for the extra step.]