Skip to content

Commit

Permalink
Update CopyBlock.tsx (#115)
Browse files Browse the repository at this point in the history
Added aria-label to button for better accessibility.
  • Loading branch information
tahoedesigner authored Sep 7, 2023
1 parent 7150ddc commit 8b5c0ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-code-blocks/src/components/CopyBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default function CopyBlock({
// @ts-ignore
<Code text={text} theme={theme} {...rest} />
)}
<Button type="button" onClick={handler} {...{ theme, copied }}>
<Button aria-label="Copy Code" type="button" onClick={handler} {...{ theme, copied }}>
<Copy
color={copied ? theme.stringColor : theme.textColor}
copied={copied}
Expand Down

0 comments on commit 8b5c0ac

Please sign in to comment.