documentation
documentation copied to clipboard
Announce copy to clipboard action
Fix screen reader not announcing any information upon activating 'Copy to Clipboard' button
References
Related to https://github.com/github/accessibility-audits/issues/2795
Considered options:
- Focus a hidden element with the announcement text. Doesn't work nice for Safari tried workarounds, not working and it is becoming hackish and ugly.
- Create a notification/toast element and style it GitHub way (https://primer.style/css/components/toasts) - didn't figure out how to use the
.Toastclass, didn't find any usage across wubwub and documentation projects. - Primer React doesn't seem to have a notification/toast component. The closest thing to that is the Dialog. Customizing it would require a lot of effort, IMO.
- Gatsby seems to have a notification feature, but it is probably only for system/its own usage - couldn't find a way to use it from a theme. Gatsby plugins seem to be about build time notifications and not web notifications.
I now want to make a notification component like in wubwub. Since it seems it is the only proper way to solve issue.