From a36f9ffc51ced285979dde6c0eaeaec113b78e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EA=B1=B4=EC=9A=B0?= Date: Mon, 29 May 2023 17:51:08 +0900 Subject: [PATCH] (feat): adding aria-label, aria-describedby, role --- src/FileUploader.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/FileUploader.tsx b/src/FileUploader.tsx index 314d90a4..87c1121d 100644 --- a/src/FileUploader.tsx +++ b/src/FileUploader.tsx @@ -31,6 +31,8 @@ type Props = { handleChange?: (arg0: File | Array | File) => void; onDraggingStateChange?: (dragging: boolean) => void; dropMessageStyle?: React.CSSProperties | undefined; + ariaLabel?: string | undefined; + ariaDescribedby?: string | undefined; }; /** * @@ -124,7 +126,9 @@ const FileUploader: React.FC = (props: Props): JSX.Element => { multiple, required, onDraggingStateChange, - dropMessageStyle + dropMessageStyle, + ariaLabel, + ariaDescribedby } = props; const labelRef = useRef(null); const inputRef = useRef(null); @@ -223,6 +227,9 @@ const FileUploader: React.FC = (props: Props): JSX.Element => { ref={labelRef} htmlFor={name} onClick={blockEvent} + aria-describedby={ariaDescribedby} + role="button" + aria-label={ariaLabel} >