Skip to content

Commit 443f4c9

Browse files
authored
Merge pull request #334 from softnetics/tong/fix/drop-zone-empty-button
fix: change DropZoneEmptyUploadButton from span to button for better accessibility
2 parents 4815b82 + 7a1d32b commit 443f4c9

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.changeset/violet-moose-fold.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@genseki/react": patch
3+
---
4+
5+
fix: change DropZoneEmptyUploadButton from span to button for better accessibility

legacies/react/v2/components/primitives/drop-zone.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,15 +255,15 @@ export const DropZoneEmptyUploadButton = ({
255255
variant="outline"
256256
asChild
257257
children={
258-
<span
258+
<button
259259
className={cn(
260260
'group-disabled/dropzone:bg-surface-primary-disabled group-disabled/dropzone:active:bg-surface-primary-disabled group-disabled/dropzone:cursor-default',
261261
className
262262
)}
263263
>
264264
<PaperclipIcon />
265265
<span>Upload {maxFiles === 1 ? 'a file' : 'files'}</span>
266-
</span>
266+
</button>
267267
}
268268
{...props}
269269
/>

0 commit comments

Comments
 (0)