task: fix focus order in create new event form#348
Open
fahatadam wants to merge 2 commits into
Open
Conversation
|
@fahatadam is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@fahatadam Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Pull Request
Description
This PR addresses a UI/UX issue where keyboard focus in the
app/(dashboard)/events/new/form would jump prematurely to the submit button before reaching the outcomes fieldset. We resolved this by remapping the DOM order to match the visual reading order without relying on positivetabIndexvalues, ensuring a natural keyboard tab sequence that conforms to WCAG 2.1 AA (2.4.3 Focus Order).Type of Change
Related Issues
Closes #267
Changes Made
Files Modified
app/(dashboard)/events/new/page.tsxapp/(dashboard)/events/new/page.test.tsx(New file)app/(dashboard)/settings/ACCESSIBILITY.mdKey Changes
page.tsx): Removed the two-column wrapperdivs and applied explicit CSS Grid placements (md:col-start-*,md:row-start-*). This flattens the DOM structure so that the logical DOM order perfectly aligns with the left-to-right, top-to-bottom tab traversal sequence, all while visually maintaining the original 2-column aesthetic.tabIndexDependencies: Assured that focus flow acts natively rather than manually hijacking it with positivetabIndexattributes.page.test.tsx): Created a regression test utilizing Jest and Testing Library'suserEvent.tab()to assert that keyboard navigation naturally hits all inputs sequentially.ACCESSIBILITY.md): Added guidelines outlining the pattern of using explicit grid placing instead of wrapper divs to maintain logical DOM sequences for screen readers.Testing
Test Coverage
Screenshots/Videos
Minimum screenshots for UI/design PRs
Before
(Please insert screenshot showing previous focus order issue if available)
After
(Please insert screenshot showing corrected focus order)
Pre-submission Checklist
Code Quality
Functionality
Documentation
Security & Accessibility
Breaking Changes
Breaking Changes:
Migration Steps:
Additional Notes
Dependencies
Performance Impact
Browser/Device Support
Labels
bugfixui/uxaccessibilityfrontendtest updatesReviewers
Note: Please ensure all checkboxes are completed before submitting this PR. This helps maintain code quality and speeds up the review process.