fix(a11y): consistent confirm/cancel button ordering (#474)#507
Open
Whiznificent wants to merge 1 commit into
Open
fix(a11y): consistent confirm/cancel button ordering (#474)#507Whiznificent wants to merge 1 commit into
Whiznificent wants to merge 1 commit into
Conversation
) Make DOM, visual, and Tab order match for every dialog/alert-dialog and mobile drawer to satisfy WCAG 2.4.3 Focus Order and provide a thumb-friendly mobile primary action at the bottom. Changes: * AlertDialogFooter / DialogFooter: drop `flex-col-reverse` so cancel renders above the action visually on mobile, while keeping the desktop right-aligned row layout. Replace `sm:space-x-2` with `sm:gap-3` and add vertical `gap-2` so spacing is consistent across viewports. * AlertDialogCancel: drop leftover `mt-2 sm:mt-0` now handled by the parent gap. * BetConfirmPattern / DisputeActionPattern mobile DrawerFooter: reorder so Cancel precedes the primary/destructive action in the DOM so the visual order matches Tab order. * docs/BUTTON_ORDER.md: new canonical rule document. * docs/a11y-status.md: add audit row referencing Predictify-org#474 and the new doc. * components/ui/__tests__/dialog-footer.test.tsx: focused tests asserting DOM order, Tab order, and absence of `flex-col-reverse`.
|
Someone 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. |
|
@Whiznificent 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.
Make DOM, visual, and Tab order match for every dialog/alert-dialog and mobile drawer to satisfy WCAG 2.4.3 Focus Order and provide a thumb-friendly mobile primary action at the bottom.
Changes:
flex-col-reverseso cancel renders above the action visually on mobile, while keeping the desktop right-aligned row layout. Replacesm:space-x-2withsm:gap-3and add verticalgap-2so spacing is consistent across viewports.mt-2 sm:mt-0now handled by the parent gap.flex-col-reverse.Pull Request
Description
Type of Change
Related Issues
Changes Made
Files Modified
Key Changes
Testing
Test Coverage
Screenshots/Videos
Minimum screenshots for UI/design PRs
Before
After
Pre-submission Checklist
Code Quality
Functionality
Documentation
Security & Accessibility
Breaking Changes
Breaking Changes:
Migration Steps:
Additional Notes
Dependencies
Performance Impact
Browser/Device Support
Labels
feature- for new featuresbugfix- for bug fixesdocumentation- for documentation changesenhancement- for improvementsbreaking-change- for breaking changesfrontend- for frontend changesbackend- for backend changesui/ux- for design changesReviewers
Closes #474
Note: Please ensure all checkboxes are completed before submitting this PR. This helps maintain code quality and speeds up the review process.