Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/calm-icons-shine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@leafygreen-ui/tokens': patch
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changeset references '@leafygreen-ui/tokens' but this PR modifies '@leafygreen-ui/form-field'. The package name should be '@leafygreen-ui/form-field' to match the changed component.

Suggested change
'@leafygreen-ui/tokens': patch
'@leafygreen-ui/form-field': patch

Copilot uses AI. Check for mistakes.
---

Updated color tokens:
- Adds border info, onInfo, warning, and onWarning tokens
- Adds text info, onInfo, warning, and onWarning tokens
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changeset description mentions color token updates, but this PR removes duplicate aria-* attributes in FormField. The description should explain the actual changes: 'Fixes duplicate aria-* attributes (aria-label, aria-labelledby, aria-invalid) and readOnly prop being passed to child components in FormField.'

Suggested change
'@leafygreen-ui/tokens': patch
---
Updated color tokens:
- Adds border info, onInfo, warning, and onWarning tokens
- Adds text info, onInfo, warning, and onWarning tokens
'@leafygreen-ui/form-field': patch
---
Fixes duplicate aria-* attributes (aria-label, aria-labelledby, aria-invalid) and readOnly prop being passed to child components in FormField.

Copilot uses AI. Check for mistakes.
9 changes: 8 additions & 1 deletion packages/form-field/src/FormField/FormField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export const FormField = forwardRef<HTMLDivElement, FormFieldProps>(
optional,
id,
'data-lgid': dataLgId,
'aria-label': ariaLabelProp,
'aria-labelledby': ariaLabelledbyProp,
'aria-invalid': ariaInvalidProp,
readOnly,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should match everything thats returned with input props:

export interface FormFieldInputElementProps {
id: string;
'aria-describedby': string;
'aria-labelledby'?: string;
'aria-label'?: string;
'aria-disabled'?: boolean;
'aria-invalid'?: FormFieldProps['aria-invalid'];
readOnly?: boolean;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we also add test specs for this fix?

...rest
}: FormFieldProps,
fwdRef,
Expand All @@ -62,7 +66,10 @@ export const FormField = forwardRef<HTMLDivElement, FormFieldProps>(
state,
id,
disabled,
...rest,
'aria-label': ariaLabelProp,
'aria-labelledby': ariaLabelledbyProp,
'aria-invalid': ariaInvalidProp,
readOnly,
});

const formFieldFeedbackProps = {
Expand Down
Loading