-
Notifications
You must be signed in to change notification settings - Fork 79
LG-5835: Rm dupe aria-* attributes in FormField #3417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,7 @@ | ||||||||||||||||||||||
| --- | ||||||||||||||||||||||
| '@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/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. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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, | ||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should match everything thats returned with input props:
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we also add test specs for this fix? |
||||||||||||||||||
| ...rest | ||||||||||||||||||
| }: FormFieldProps, | ||||||||||||||||||
| fwdRef, | ||||||||||||||||||
|
|
@@ -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 = { | ||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
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.