From f5cd71947c3a596ae518cd3628836a529fba7608 Mon Sep 17 00:00:00 2001 From: Daichi Hashimura Date: Thu, 21 Nov 2024 19:36:16 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20useId=E3=82=92prefix=E3=81=A8=E3=81=97?= =?UTF-8?q?=E3=81=A6=E5=86=8D=E5=88=A9=E7=94=A8=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/smarthr-ui/src/components/Textarea/Textarea.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/smarthr-ui/src/components/Textarea/Textarea.tsx b/packages/smarthr-ui/src/components/Textarea/Textarea.tsx index bce726a936..5d87afba2c 100644 --- a/packages/smarthr-ui/src/components/Textarea/Textarea.tsx +++ b/packages/smarthr-ui/src/components/Textarea/Textarea.tsx @@ -107,7 +107,7 @@ export const Textarea = forwardRef( ref, ) => { const maxLettersId = useId() - const maxLettersNoticeId = useId() + const maxLettersNoticeId = `${maxLettersId}-notice` const actualMaxLettersId = maxLetters ? maxLettersId : undefined const textareaRef = useRef(null) @@ -173,7 +173,7 @@ export const Textarea = forwardRef( [], ) - // countが連続で更新されると、スクリーンリーダーが古い値を読み上げてしまうため、メッセージ更新遅延しています + // countが連続で更新されると、スクリーンリーダーが古い値を読み上げてしまうため、メッセージの更新を遅延しています // eslint-disable-next-line react-hooks/exhaustive-deps const debouncedUpdateSrCounterMessage = useCallback( debounce((value: string) => { @@ -271,7 +271,6 @@ export const Textarea = forwardRef( {counterVisualMessage} - {srCounterMessage} 最大{maxLetters}文字入力できます。