fix(web-react): remove name attribute from fileuploader root div #DS-1594#2544
Merged
fix(web-react): remove name attribute from fileuploader root div #DS-1594#2544
Conversation
✅ Deploy Preview for spirit-design-system-docsite ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for spirit-design-system ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for spirit-design-system-storybook canceled.
|
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where the name attribute was being spread onto the root <div> of FileUploaderInput (via restProps/transferProps), in addition to the <input> element. The fix destructures name from props and passes it explicitly only to the file input. It also fixes a mismatched for/id label association in the HTML demo.
Changes:
- Destructure
namefrom props inFileUploaderInput.tsxso it's excluded fromrestPropsand only applied to the<input>element - Add a test verifying the root
<div>does not have anameattribute while the input does - Fix a mismatched
forattribute in the web package's HTML demo file
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
packages/web-react/src/components/FileUploader/FileUploaderInput.tsx |
Destructure name from props and pass it explicitly to the <input> element only |
packages/web-react/src/components/FileUploader/__tests__/FileUploaderInput.test.tsx |
Add test ensuring name is not on the root div and is on the input |
packages/web/src/scss/components/FileUploader/index.html |
Fix for attribute to match the input's id |
You can also share your feedback on Copilot code review. Take the survey.
literat
reviewed
Mar 15, 2026
packages/web-react/src/components/FileUploader/__tests__/FileUploaderInput.test.tsx
Outdated
Show resolved
Hide resolved
literat
approved these changes
Mar 15, 2026
katerinarehorkova
approved these changes
Mar 16, 2026
9bcb252 to
a9f268c
Compare
a9f268c to
fa46ec3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Additional context
Issue reference
https://jira.almacareer.tech/browse/DS-1594