Skip to content
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

Add missing accessibility labels #5390

Merged
merged 5 commits into from Mar 31, 2023

Conversation

GBKS
Copy link
Contributor

@GBKS GBKS commented Mar 20, 2023

Various buttons around the application are missing accessibility labels. A user who can only interact with the app using a screen reader will not know what the buttons do.

I cannot get the application to build locally, so I cannot test my changes (will try again, but already wasted 2 hours). But I still want to see progress on this task, so I am starting anyways. The changes are really basic, just adding single attributes to elements in various components and screens, so it should not be a huge big issue. I'd appreciate it if someone else could help test.

To find issues, I am testing the app using a screen reader (here's how I do that), browsing the old branch by @limpbrains, and searching the code.

I am not aiming for 100% with this PR, but I will consider it a success and will open it for review when a good majority of accessibility labels have been added.

Here are some screenshots with examples, with the missing button labels outlined in red (remember that a user will not be able to see the screen at all, they will only know what's in the grey tool tips).

image

Copy link
Member

@Overtorment Overtorment left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@GBKS
Copy link
Contributor Author

GBKS commented Mar 21, 2023

Thanks for the quick approval, but no rush. I left it intentionally as a draft as I want to keep working on it. I think there are a few more buttons that need labels.

If you have any tips, my local build still fails with the following:
SwiftEmitModule normal arm64 Emitting\ module\ for\ rn_ldk (in target 'rn-ldk' from project 'Pods')

pod update did not fix it for me.

@limpbrains
Copy link
Collaborator

On M1 you need to run xcode with roseta enabled
Right click xcode, get info, enable rosetta
I haven't tried it. @marcosrdz can help with it.

@GBKS
Copy link
Contributor Author

GBKS commented Mar 21, 2023

Thanks for the tip, that did not work. I tried a bunch of different things, searched online for other fixes, but no luck.

@marcosrdz
Copy link
Member

LGTM. Thank you!

@Overtorment
Copy link
Member

i personally develop on android emu.

@marcosrdz can you help @GBKS with running on apple sim?

@marcosrdz
Copy link
Member

marcosrdz commented Mar 22, 2023

Thanks for the tip, that did not work. I tried a bunch of different things, searched online for other fixes, but no luck.

@GBKS any chance you can share a screenshot of the build error (after quitting xcode, enabling rosetta on xcode, then reopening and rebuilding)?

It's possible Rosetta was enabled while xcode was still open.

@GBKS
Copy link
Contributor Author

GBKS commented Mar 23, 2023

Thanks for the tip. I even restarted my computer to ensure that the change is properly applied.

Command line gives me this one:
image

Xcode gives me this one:
image

Thanks for your help.

I used the "eslint-plugin-react-native-a11y" plug-in to identify more problems and went through all the commendations for buttons. I ignored input fields (about 25 issues found), since I am not 100% sure about the best way to fix them and it might be better to tackle that in a separate PR and keep this one focused on buttons.
@GBKS
Copy link
Contributor Author

GBKS commented Mar 27, 2023

I pushed a bunch more fixes. This time I used the "eslint-plugin-react-native-a11y" (via this recommendation) plug-in to identify more problems and went through all the recommendations for buttons.

Sometimes the linter also recommends to add an accessibility hint, but I am not convinced it is always needed (the hint is in addition to the label, to describe what happens when interacting). This might have to be revisited on a case-by-base basis.

I ignored input fields (linter found about 25 issues), since I am not 100% sure about the best way to fix them (do we need label properties, or link to respective text labels on the page, or is the placeholder enough, or based on context, etc) and it might be better to tackle that in a separate PR and keep this one focused on buttons.

Small note about line 398 in ScanQRCode.js, there's a note that reads this is an invisible backdoor button. This button is perfectly visible for people who rely on accessibility tools, it's only invisible for the good-vision crowd. Basically the opposite of the camera feed (and QR code at the moment), where low-vision peeps cannot see it, but the others can.

I still can't build the app, same issues as before. But I'll remove draft status now, as the PR includes a lot of changes now and should cover most simple button fixes. I'd appreciate your reviews, and ideally someone can also build the app and verify hands-on that elements can be properly identified now with the accessibility labels. We have several videos linked to in the Bitcoin Design Guide that show how to set up your phone for testing and perform quick tests. It really doesn't take much time at all.

Let me know if I added the localization labels in all the right places. There are also some spots where I used labels from specific categories that may not have been appropriate. I'm happy to get your feedback and implement it.

@GBKS GBKS marked this pull request as ready for review March 27, 2023 08:37
As complained about CircleCi.
Copy link
Member

@Overtorment Overtorment left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Overtorment
Copy link
Member

full test suite & builds run here: #5411

@GBKS
Copy link
Contributor Author

GBKS commented Mar 29, 2023

Just merged master to resolve the conflict in list.js.

For the "Add" button on the wallet list screen
For more options in send details

I found these through testing. The A11y linter did not catch them.
@Overtorment
Copy link
Member

runnint builds & tests here: #5424

@Overtorment
Copy link
Member

looks like all tests in #5424 passed.
shall we merge? @GBKS @marcosrdz

@marcosrdz
Copy link
Member

looks like all tests in #5424 passed.
shall we merge? @GBKS @marcosrdz

Yup

@GBKS
Copy link
Contributor Author

GBKS commented Mar 30, 2023

Merging sounds good to me if you are confident in my code changes 😀

@Overtorment Overtorment merged commit 8d46cc6 into BlueWallet:master Mar 31, 2023
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants