Fix form accessibility 2/4#12370
Fix form accessibility 2/4#12370luacmartins merged 31 commits intoExpensify:mainfrom mdneyazahmad:fix/7916-accessibility
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
I see this is still coming along, and curious to ask for a potential ETA on completion. Like can we say this week for example (before Friday)? |
|
I have plans to continue the review today. |
|
@parasharrajat any update? |
parasharrajat
left a comment
There was a problem hiding this comment.
Let's wrap this up. Sorry for the delay.
|
Please merge main as well. |
|
@parasharrajat given my comment here and the form guidelines, I think we are safe to continue without addressing #12370 (comment). Any thoughts? |
|
Bump! |
|
I will check it tomorrow IST busy with other issues today. |
|
Bump! Let's get this one through the finish line! |
|
Looking into it in a few hours. |
|
@mdneyazahmad can you please merge main and resolve the conflicts? |
|
Main merged, conflicts resolved! |
|
Thanks @mdneyazahmad! |
luacmartins
left a comment
There was a problem hiding this comment.
Looks good, just a minor console error!
|
@mdneyazahmad let a small comment above. Let me know once you addressed that issue! |
|
@mdneyazahmad in addition to my previous comment, there are conflicts now! |
|
Updated! |
luacmartins
left a comment
There was a problem hiding this comment.
LGTM and tests well!
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromechrome.movMobile Web - Safarisafari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
|
I'm gonna merge this to get the functionality out. We can address any issues in a follow up if necessary. Thanks for the reviews everyone! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Thanks for unblocking this @luacmartins. |
Performance Comparison Report 📊Significant Changes To DurationThere are no entries Meaningless Changes To DurationShow entries
Show details
|
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.2.60-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.2.60-1 🚀
|
Details
This PR tries to fix the issue with accessibility in the form (web and desktop). The user should be able to navigate with Tab and Shift + Tab to focus the next and prev focusable element and on pressing enter, it should submit the form.
Context:
This is a part of a bigger issue (form accessibility) broken into 4 issues #7523, #7916, #7917, #7918. I am assigned to 3 of these, and not on #7523.
As per the expected behaviour:
I created a PR (#8874) to handle checkbox issue that is common to all the issues.
There are some challenges about the Enter key press to submit the form, as the current implementation attaches a global handler for each form. This submits the form whenever enter key is pressed, and this is not expected. Sometimes user wants to press enter on a button, and this produces some secondary interaction (also submits the form).
We have opened a discussion https://expensify.slack.com/archives/C01GTK53T8Q/p1654195847140899 to find a solution of this issue, and the consensious is to fix the issue with a poc given draft (#9749).
Later in the poc we have find that we still have some challenges to solve. Meanwhile, I proposed a soluton here #9749 (comment) to handle this issue, and this PR is based on that.
Fixed Issues
$ #7916
PROPOSAL: #7916 (comment)
Tests | QA Steps
Tests (Web and desktop)
Test 1 (Workspace general settings)
TabandShift + Tabmoves the focus to next and prev element.Test 2 (Workspace general settings)
Tabto focus on currency fieldTabto focus on save button.Test 3 (Invite member)
TabandShift + Tabmoves the focus to next and prev element.Test 4 (Invite member)
Test 5 (set password web and mweb only)
TabandShift + Tabmoves the focus to next and prev element.Tests (native and mweb)
Test 1 (Workspace general settings)
Test 2 (Workspace invite member)
Test 3 (Set new password)
PR Author Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)PR Reviewer Checklist
The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarhave been tested & I retested again)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)Screenshots
Web
web-invite.mp4
web-setpassword.mp4
web-settings.mp4
Mobile Web - Chrome
mweb-chrome-invite.mov
mweb-chrome-setpassword.mov
mweb-chrome-settings.mov
Mobile Web - Safari
mweb-safari-invite.mov
mweb-safari-setpassword.mov
mweb-safari-settings.mov
Desktop
desktop-invite.mp4
desktop-settings.mp4
iOS
ios-invite.mov
ios-settings.mov
Android
android-invite.mov
android-settings.mov