[Devin] fix: add type=button and aria attributes to sort button#6
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
[Devin] fix: add type=button and aria attributes to sort button#6devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
The sort button was missing type='button' (which could cause unintended form submissions), aria-label, and aria-pressed attributes. This fixes potential page reloads and improves screen reader accessibility. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
10 tasks
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.
What
The sort button is missing
type="button",aria-label, andaria-pressedattributes. Withouttype="button", if the button is ever inside a form context, browsers may treat it as a submit button and reload the page. The missing ARIA attributes make the button inaccessible to screen readers.Where
File:
app/main.jsLines: 159–171 (SortButton component)
How I found it
type,aria-label, oraria-pressedattributes.<button>tag had notype,aria-label, oraria-pressedprops. A code comment confirmed:// Missing: type="button", aria-pressed, aria-label.Evidence
Playwright DOM inspection confirmed all three attributes missing.
Fix
type="button"to prevent unintended form submissionsaria-labelwith descriptive text that updates based on sort directionaria-pressed={sortAsc}to communicate toggle state to assistive technologiesConfidence
High — Clear accessibility violation with well-defined ARIA patterns for toggle buttons.
Summary
Adds missing type and ARIA attributes to the sort button for accessibility and correctness.
Review & Testing Checklist for Human
type="button",aria-label, andaria-pressedare presentaria-pressedtoggles andaria-labelupdatesNotes
Found via static analysis and confirmed with Playwright DOM attribute inspection.
Link to Devin session: https://app.devin.ai/sessions/3b3d59c7eee04cea9069529fd6fff39d
Requested by: @scoobycoder