-
Notifications
You must be signed in to change notification settings - Fork 3k
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 form accessibility 2/4 #12370
Fix form accessibility 2/4 #12370
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
Tab
andShift + Tab
moves the focus to next and prev element.Test 2 (Workspace general settings)
Tab
to focus on currency fieldTab
to focus on save button.Test 3 (Invite member)
Tab
andShift + Tab
moves the focus to next and prev element.Test 4 (Invite member)
Test 5 (set password web and mweb only)
Tab
andShift + Tab
moves 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 Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is 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 Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
have been tested & I retested again)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is 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