-
-
Notifications
You must be signed in to change notification settings - Fork 316
fix: add missing type="button" attributes to button elements #2747
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: add missing type="button" attributes to button elements #2747
Conversation
Add explicit type="button" to buttons that don't submit forms to prevent unintended form submissions and improve accessibility. Files updated: - ToggleableList.tsx: Search filter buttons - Search.tsx: Clear search button - SortBy.tsx: Sort order toggle button - Release.tsx: Repository navigation button Fixes OWASP#2656
|
Caution Review failedThe pull request is closed. Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughAdded explicit Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5–10 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Tip ✨ Issue Enrichment is now available for GitHub issues!CodeRabbit can now help you manage issues more effectively:
Disable automatic issue enrichmentTo disable automatic issue enrichment, add the following to your issue_enrichment:
auto_enrich:
enabled: falseThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The linked issue must be assigned to the PR author. |
|



Proposed change
Resolves #2656
This PR adds the missing
type="button"attribute to button elements that are not intended to submit forms. Without this attribute, buttons default totype="submit"which can cause unintended form submissions and unexpected page behavior.Changes Made
Added explicit
type="button"to the following components:Note: ModuleList.tsx already had the correct
type="button"attribute and didn't require changes.Testing
make check-frontend- all linting and formatting checks passed ✅Checklist
make check-testlocally; all checks and tests passed.