Skip to content
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

fix: [RAC] Checkbox applies data attributes to both the input and the label #7151

Conversation

syd03098
Copy link
Contributor

@syd03098 syd03098 commented Oct 7, 2024

Closes

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@syd03098 syd03098 marked this pull request as ready for review October 7, 2024 13:52
reidbarber
reidbarber previously approved these changes Oct 8, 2024
Copy link
Member

@reidbarber reidbarber left a comment

Choose a reason for hiding this comment

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

Thanks for this!

<input {...mergeProps(inputProps, focusProps)} ref={inputRef} />
<input
// data attribute should only go to the outermost dom
{...mergeProps(removeDataAttributes(inputProps), focusProps)}
Copy link
Member

Choose a reason for hiding this comment

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

thanks for the pr!

i think this approach is fine but i think we want to match how we did it in other components like in this pr: #5008. there's a comment on that pr which mentions why

Copy link
Contributor Author

@syd03098 syd03098 Oct 10, 2024

Choose a reason for hiding this comment

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

ok, I will try that soon :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review!

Copy link
Member

@yihuiliao yihuiliao left a comment

Choose a reason for hiding this comment

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

lgtm! thanks for the test

@devongovett devongovett added this pull request to the merge queue Oct 10, 2024
Merged via the queue into adobe:main with commit 0c28454 Oct 10, 2024
29 checks passed
@syd03098 syd03098 deleted the syd03098/remove-duplicated-data-attribute-from-checkbox branch October 11, 2024 00:18
devongovett pushed a commit that referenced this pull request Oct 14, 2024
… label (#7151)

* applies data attributes to label (not input)

* not to propagate the data attributes to inputProps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants