From 58e505cd38bf3dcc53043e9cf477d29f2e4128ce Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 4 Nov 2022 18:10:53 +0000 Subject: [PATCH] Add aria-describedby associations --- src/input/Input.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/input/Input.tsx b/src/input/Input.tsx index cd7603f..047a7a6 100644 --- a/src/input/Input.tsx +++ b/src/input/Input.tsx @@ -122,6 +122,7 @@ export const InputField = forwardRef< type={type} checked={checked} disabled={disabled} + aria-describedby={description ? id + "-desc" : undefined} {...rest} /> )} @@ -135,7 +136,11 @@ export const InputField = forwardRef< {label} {suffix && {suffix}} - {description &&

{description}

} + {description && ( +

+ {description} +

+ )} ); }