fix(CopyButton): add aria-label for screen reader accessibility

Set aria-label to the same value as title so icon-only button is
properly announced by assistive technology.
This commit is contained in:
雨霖铃
2026-06-05 20:54:43 +08:00
parent b656c78d7e
commit ab3b19418b
+1
View File
@@ -53,6 +53,7 @@ export const CopyButton: React.FC<CopyButtonProps> = ({
type="button" type="button"
onClick={handleCopy} onClick={handleCopy}
title={tooltip ?? t('buttons.copy')} title={tooltip ?? t('buttons.copy')}
aria-label={tooltip ?? t('buttons.copy')}
className={cn( className={cn(
buttonVariants({ variant, size }), buttonVariants({ variant, size }),
copied && copied &&