From 65904e3b77781b97643b7a6290a8b1e4e415f05d Mon Sep 17 00:00:00 2001 From: aradhyacp Date: Wed, 15 Jul 2026 10:48:09 +0530 Subject: [PATCH 1/3] Enhance accessibility by adding aria-label to download button in CodeBlockDownloadButton component --- packages/streamdown/lib/code-block/download-button.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/streamdown/lib/code-block/download-button.tsx b/packages/streamdown/lib/code-block/download-button.tsx index 4a315d1f..3edbca76 100644 --- a/packages/streamdown/lib/code-block/download-button.tsx +++ b/packages/streamdown/lib/code-block/download-button.tsx @@ -356,6 +356,7 @@ export const CodeBlockDownloadButton = ({ return ( + {isCopied && ( + + {t.copied} + )} - data-streamdown="code-block-copy-button" - disabled={isAnimating} - onClick={copyToClipboard} - title={t.copyCode} - type="button" - {...props} - > - {children ?? } - + ); }; From 9cab1c7a6a5cb1cd9184e48a058d84a84220d7af Mon Sep 17 00:00:00 2001 From: aradhyacp Date: Wed, 15 Jul 2026 10:50:12 +0530 Subject: [PATCH 3/3] chore: add changeset for code block accessibility improvements --- .changeset/common-streets-unite.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/common-streets-unite.md diff --git a/.changeset/common-streets-unite.md b/.changeset/common-streets-unite.md new file mode 100644 index 00000000..ec169c18 --- /dev/null +++ b/.changeset/common-streets-unite.md @@ -0,0 +1,5 @@ +--- +"streamdown": minor +--- + +Added accessibility improvements for code block controls by adding aria labels to copy/download buttons and announcing copy success state for screen readers.