diff --git a/app/components/UInputCopy.vue b/app/components/UInputCopy.vue index 6ac64d3f1..ba54e98ee 100644 --- a/app/components/UInputCopy.vue +++ b/app/components/UInputCopy.vue @@ -16,6 +16,10 @@ const props = defineProps({ const { copy, copied } = useClipboard() const { track } = useAnalytics() +const ariaLabel = computed(() => + props.label ? `Copy "${props.label}" to clipboard` : 'Copy command to clipboard' +) + function copyValue() { track('Command Copied', { value: props.value }) copy(props.value) @@ -45,7 +49,7 @@ function copyValue() { '!text-primary cursor-default': copied, 'cursor-copy': !copied }" - aria-label="copy button" + :aria-label="ariaLabel" @click="copyValue" /> diff --git a/app/layouts/default.vue b/app/layouts/default.vue index 16858551c..c2ea1cc20 100644 --- a/app/layouts/default.vue +++ b/app/layouts/default.vue @@ -17,6 +17,13 @@ onMounted(() => {