From ea2034858f4ab60e698db23334229cee104a81fe Mon Sep 17 00:00:00 2001 From: "codegen-sh[bot]" <131295404+codegen-sh[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 03:18:25 +0000 Subject: [PATCH 1/2] Fix FormControl aria-describedby attribute handling --- packages/components/src/ui/form.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/components/src/ui/form.tsx b/packages/components/src/ui/form.tsx index 0fda05ee..b2e01cad 100644 --- a/packages/components/src/ui/form.tsx +++ b/packages/components/src/ui/form.tsx @@ -105,9 +105,14 @@ export function FormControl({ Component, ...props }: FormControlProps) { const computedDescriptionId = fromPropsDesc ?? context.formDescriptionId; const computedMessageId = fromPropsMsg ?? context.formMessageId; + // Fix: Only include aria-describedby if there's an error or description + const ariaDescribedBy = []; + if (computedDescriptionId) ariaDescribedBy.push(computedDescriptionId); + if (error && computedMessageId) ariaDescribedBy.push(computedMessageId); + const ariaProps = { id: computedId, - 'aria-describedby': error ? `${computedDescriptionId} ${computedMessageId}` : computedDescriptionId, + ...(ariaDescribedBy.length > 0 ? { 'aria-describedby': ariaDescribedBy.join(' ') } : {}), 'aria-invalid': !!error, } as const; From 7181659d3ec458852b7844d4322dfdfe6a25dbaa Mon Sep 17 00:00:00 2001 From: "codegen-sh[bot]" <131295404+codegen-sh[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 03:19:15 +0000 Subject: [PATCH 2/2] Update yarn.lock for @lambdacurry/forms v0.19.5 --- package.json | 5 ++++- packages/components/package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 80343420..609afa67 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,10 @@ "name": "forms", "version": "0.2.0", "private": true, - "workspaces": ["apps/*", "packages/*"], + "workspaces": [ + "apps/*", + "packages/*" + ], "scripts": { "start": "yarn dev", "dev": "turbo run dev", diff --git a/packages/components/package.json b/packages/components/package.json index 40735d67..208adedd 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@lambdacurry/forms", - "version": "0.19.4", + "version": "0.19.5", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts",