Skip to content

fix(web-react): remove name attribute from fileuploader root div #DS-1594#2544

Merged
dlouhak merged 2 commits intomainfrom
fix/DS-1594-fileuploader-html-validation
Mar 16, 2026
Merged

fix(web-react): remove name attribute from fileuploader root div #DS-1594#2544
dlouhak merged 2 commits intomainfrom
fix/DS-1594-fileuploader-html-validation

Conversation

@dlouhak
Copy link
Copy Markdown
Contributor

@dlouhak dlouhak commented Mar 13, 2026

Description

Additional context

Issue reference

https://jira.almacareer.tech/browse/DS-1594

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 13, 2026

Deploy Preview for spirit-design-system-docsite ready!

Name Link
🔨 Latest commit fa46ec3
🔍 Latest deploy log https://app.netlify.com/projects/spirit-design-system-docsite/deploys/69b7eb25318cdb0008e586f5
😎 Deploy Preview https://deploy-preview-2544--spirit-design-system-docsite.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 13, 2026

Deploy Preview for spirit-design-system ready!

Name Link
🔨 Latest commit fa46ec3
🔍 Latest deploy log https://app.netlify.com/projects/spirit-design-system/deploys/69b7eb25d4c02d00087c3e66
😎 Deploy Preview https://deploy-preview-2544--spirit-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 13, 2026

Deploy Preview for spirit-design-system-storybook canceled.

Name Link
🔨 Latest commit fa46ec3
🔍 Latest deploy log https://app.netlify.com/projects/spirit-design-system-storybook/deploys/69b7eb256ef7610009088070

@github-actions github-actions bot added the bug Something isn't working label Mar 13, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 name from props in FileUploaderInput.tsx so it's excluded from restProps and only applied to the <input> element
  • Add a test verifying the root <div> does not have a name attribute while the input does
  • Fix a mismatched for attribute 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.

@dlouhak dlouhak force-pushed the fix/DS-1594-fileuploader-html-validation branch from 9bcb252 to a9f268c Compare March 16, 2026 10:23
@dlouhak dlouhak force-pushed the fix/DS-1594-fileuploader-html-validation branch from a9f268c to fa46ec3 Compare March 16, 2026 11:36
@dlouhak dlouhak merged commit 9a99a4d into main Mar 16, 2026
40 checks passed
@dlouhak dlouhak deleted the fix/DS-1594-fileuploader-html-validation branch March 16, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants