Require explicit type attribute on button elements (#4781)#5098
Require explicit type attribute on button elements (#4781)#5098guillermo-escire wants to merge 8 commits intoDSpace:mainfrom
Conversation
|
@guillermo-escire : This PR is currently failing lint checks |
|
Hi @guillermo-escire, |
f256603 to
b741f29
Compare
alexandrevryghem
left a comment
There was a problem hiding this comment.
@guillermo-escire Thnx for this PR, I haven't tested the code but while looking at the file changes I noticed that you accidentally reverted code changes from main during your rebase. I (think) I added an inline comment for all the issues, but could you take a look as well and revert them?
src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.html
Outdated
Show resolved
Hide resolved
src/app/home-page/recent-item-list/recent-item-list.component.html
Outdated
Show resolved
Hide resolved
...em-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.html
Outdated
Show resolved
Hide resolved
src/app/item-page/edit-item-page/item-delete/item-delete.component.html
Outdated
Show resolved
Hide resolved
src/app/item-page/orcid-page/orcid-auth/orcid-auth.component.html
Outdated
Show resolved
Hide resolved
src/app/profile-page/profile-page-researcher-form/profile-page-researcher-form.component.html
Outdated
Show resolved
Hide resolved
src/app/submission/sections/upload/file/section-upload-file.component.html
Outdated
Show resolved
Hide resolved
src/app/submission/sections/upload/file/section-upload-file.component.html
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
This file should be removed
|
Hi @alexandrevryghem, thank you for the detailed review. I’ve addressed all the comments and reverted the unintended changes introduced during the rebase. The affected files have been restored to match I’ll push the updated changes shortly. Thanks again for your feedback! |
|
@guillermo-escire: Thnx I've verified that most of the changes were reverted but 6 of them still need to be fixed could you take a look again? (I marked all the fixed ones as resolved so those comments should already be collapsed) |
References
Fixes #4781
Description
This PR ensures that all elements explicitly define their type attribute, preventing unintended form submissions and aligning the codebase with accessibility and HTML best practices.
Instructions for Reviewers
This PR updates multiple Angular templates to explicitly define the type attribute on all
elements. The main goal is to prevent unexpected form submissions caused by the default type="submit" behavior and to comply with the ESLint rule proposed in #4781.List of changes in this PR:
How to test / review:
Checklist
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.