-
Notifications
You must be signed in to change notification settings - Fork 114
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
👤🔊 OP Accessibility: Screen Reader Improvements #1118
Conversation
…s, note-translation not found for more info button
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1118 +/- ##
=======================================
Coverage 77.55% 77.55%
=======================================
Files 28 28
Lines 1702 1702
Branches 367 367
=======================================
Hits 1320 1320
Misses 382 382
Flags with carried forward coverage won't be shown. Click here to find out more. |
I also found these discussions that might be helpful for figuring out the popup - screen reader reading what's behind the popup issue: |
- Added onPress to the entire TouchableOpacity, so that both the text and icon are clickable - Added aria-hidden for IconButton
The BottomNavigation element provided by React Paper allows us to set an accessibilityLabel for each route button. Paper defaultly creates 2 text fields for each route (whether there's an accessibilityLabel, or themes present at all). One of them displays the text for the route, and the other is a exact-identical element, but has its opacity changed to 1 when its route is not-selected, and 0 when its route is selected. This appears to be so that the text is thicker when it is not selected, and thinner when it is selected. My hope is that the screen reader will pick up this accessibilityLabel, and not read the internal text fields.
For accessibility improvements, see e-mission/e-mission-phone#1118
This is the i18n translation files PR for removing non-character characters e-mission/e-mission-translate#53 |
For accessibility improvements, see translations in e-mission/e-mission-translate#53
Accessibility and screen readers do not necessarily need to know what the text is of what the icon is supposed to be representing, and the React Native Paper element for List.Icon does not handle accessibilityLabel (the accessibilty label that is produced is undefined, [] empty box)
…n instead of button React Native Paper does not handle AccessibiltyRole, so we have to just rename the accessibility text to include "spinbutton" to identify this object as a spinbutton. I am going with the expectation that accessibility elements in other languages (e.g. Spanish, Lao) use the same names for objects, such as "spinbutton", "button", etc. because this won't be translated
I have completed most of the changes I want to for now. Here is a summary:
|
@JGreenlee I added this to your review board, if either you or @jiji14 have time I'd really appreciate you taking a look and providing feedback! :) Next step is to test on a physical device. My test phone does not have the software update to support the current staging release of OpenPATH, so I need to work with @jiji14 to use theirs. However, I am not sure what's the process of doing this without pushing it to staging. @Abby-Wheelis or @JGreenlee do you know the process for getting the app to run with our custom code and test travel data, so that Jiji and I can test what the screen reader actually reads? |
I only know how to do it for Android, but you can either:
|
I will test with an Android phone and comment here after I am done testing. I love how your summary is organized! |
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.
Thanks for taking on this work and addressing a good number of these issues.
This review is not conclusive and we still have testing to do -- but I do want to leave an initial batch of comments here
package-lock.json
Outdated
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.
remove this file please
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.
Deleted d5b7b51
@sebastianbarry Here are the test results! I recorded them for your reference. Please let me know if you have any questions! Test Device InformationAndroid - Samsung Galaxy S20 1. Logout button acts as 1 buttonFAIL
IMG_0.66.MOV2. Unpronounceable metrics card icons on DashboardPASSIMG_5.MOV3. Remove non-character characters, like 👇PASSIMG_4.MOV4. BottomNavigation buttons read double: "Profile Profile"FAILTab buttons still read double ex) IMG_0.MOV5. Remove focusable for icons in profile settings screenPASSIMG_6.MOV6. Read dropdown as "spinbutton" in profile settings screenPASSIt says IMG_0.31.MOV |
This way, the accessibility DOM sees it as one single clickable button, and does not attempt to focus on the text ever. I modeled this after the settingsrow buttons, which use List.Icon as well.
@jiji14 Great testing!! I really appreciate your detail and videos, very helpful! For the failed tests...:Test 1: Logout button acts as 1 buttonI fixed this in b94abff . It should now display as one single button, like the settings row buttons do. I modeled it after them, by changing the type of element that the logout button is. Test 4: BottomNavigation buttons read double: "Profile Profile"This issue may be out of our control. I haven't changed anything, although when I test with my iPhone emulator, it does not read "Label tab label label... etc." It only reads "Label tab, Dashbaord tab, profile tab". This makes me think that what the screen reader reads is dependent upon the device's built in screen reader, so it is different from iOS to Android. I think the solution will require creating a pull request to Screen.Recording.2024-01-22.at.10.32.46.AM.mov |
@sebastianbarry Can you toggle the target branch to |
@JGreenlee Did it! let me know if it worked :) |
I'm not sure what's going on with this PR - all of my commits are showing up in the diff even though they exist in the target Either way, @sebastianbarry could you actually change it back to |
@JGreenlee I rebased it back to |
Glad that resolved itself! However, the 'build' test is now failing. Edit: It seems like the qrcode scanner Cordova plugin might be the culprit? |
I just tried testing this branch in the devapp on an Android phone with a screenreader. TalkBack did not read anything at all and I couldn't navigate to anything by swiping left/right. Confused, I tried TalkBack on the latest NREL OpenPATH. I got the same result. On all of these, TalkBack was not reading anything. Talkback works for other apps on the phone. It didn't used to be like this, so either we had a major accessibility regression at some point (at least for Android), or I'm not remembering correctly how I did it before. |
When I get time, I will go back even further and see if I can either isolate the regression, or determine that there is no regression |
At least for my iOS simulator, the accessibility inspector (simulating VoiceOver) is working on As for the build fail, I'm not sure what that is. I'm not even quite sure what the test fail error message is; is it this?
|
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.
I haven't been able to test this out on a physical device, but Jiji and Sebastian both tested. The code changes look good to me so I will push it through to 'ready for review'
The current error is
Re-running to check if that resolves the error and passes the tests |
@JGreenlee @shankari it passed! Thank you for your help |
To summrarize the current state:
Regardless, it looks like it at least works on iOS, and is a step forward, so I will plan on reviewing + merging. @sebastianbarry can you update the issue with the current status so that we can finish polishing this later? |
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.
@sebastianbarry just a few comments to fix. The main change that I would really like to include is the i18n
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.
Undoing desc
and descriptionText
changes in www/js/control/SettingRow.tsx
These are old changes from before I took over the PR, I can go ahead undo them
….tsx These are old changes from before I took over the PR, I can go ahead undo them
….tsx These are old changes from before I took over the PR, I can go ahead undo them
@shankari I addressed your comments. I think once we pass the tests, we should be good to merge!! |
Part of issue: e-mission/e-mission-docs#1011
This PR is for the purpose of taking over for @niccolopaganini, #1112
Goals: