From 99259390b106dc1648e8f773b42ccbc2479f89cd Mon Sep 17 00:00:00 2001 From: Misako Tateiwa Date: Tue, 28 Jan 2025 22:01:33 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=83=A9=E3=82=A4=E3=83=96=E3=83=A9?= =?UTF-8?q?=E3=83=AA=E3=81=AA=E3=81=A9=E3=81=A7aria-describedby=E3=81=8C?= =?UTF-8?q?=E6=8C=BF=E5=85=A5=E3=81=95=E3=82=8C=E3=82=8B=E5=A0=B4=E5=90=88?= =?UTF-8?q?=E3=81=8C=E3=81=82=E3=82=8B=E3=81=9F=E3=82=81=E3=80=81input?= =?UTF-8?q?=E8=A6=81=E7=B4=A0=E3=81=ABaria-describedby=E3=81=8C=E7=B4=90?= =?UTF-8?q?=E3=81=A5=E3=81=84=E3=81=A6=E3=81=84=E3=82=8B=E5=A0=B4=E5=90=88?= =?UTF-8?q?=E3=82=82describedbyIds=E3=82=92=E8=A8=AD=E5=AE=9A=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../smarthr-ui/src/components/FormControl/FormControl.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/smarthr-ui/src/components/FormControl/FormControl.tsx b/packages/smarthr-ui/src/components/FormControl/FormControl.tsx index d8ed33514c..8c3bf6e8c4 100644 --- a/packages/smarthr-ui/src/components/FormControl/FormControl.tsx +++ b/packages/smarthr-ui/src/components/FormControl/FormControl.tsx @@ -252,8 +252,9 @@ export const ActualFormControl: React.FC = ({ const input = inputWrapper.querySelector(SMARTHR_UI_INPUT_SELECTOR) - if (input && !input.getAttribute(attrName)) { - input.setAttribute(attrName, describedbyIds) + if (input) { + const attribute = input.getAttribute(attrName) + input.setAttribute(attrName, attribute ? `${attribute} ${describedbyIds}` : describedbyIds) } }, [describedbyIds]) useEffect(() => {