Skip to content

Commit 8b5c0ac

Browse files
Update CopyBlock.tsx (#115)
Added aria-label to button for better accessibility.
1 parent 7150ddc commit 8b5c0ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-code-blocks/src/components/CopyBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export default function CopyBlock({
9494
// @ts-ignore
9595
<Code text={text} theme={theme} {...rest} />
9696
)}
97-
<Button type="button" onClick={handler} {...{ theme, copied }}>
97+
<Button aria-label="Copy Code" type="button" onClick={handler} {...{ theme, copied }}>
9898
<Copy
9999
color={copied ? theme.stringColor : theme.textColor}
100100
copied={copied}

0 commit comments

Comments
 (0)