-
Notifications
You must be signed in to change notification settings - Fork 74
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 all commits
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,5 @@ | ||
| --- | ||
| '@leafygreen-ui/form-field': patch | ||
|
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 believe if this is a |
||
| --- | ||
|
|
||
| Removes duplicate `aria-*` attributes | ||
|
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. Nit: also removes duplicate |
||
| 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.
When checking the
FormFieldstorybook example, I see this change has addressed the initial issue, but it looks like there is a separate issue with duplicate usages ofdata-lgidanddata-testidon different nodes. Can we batch those fixes with this change?