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

Improve A11y of the stripe widget #656

Merged
merged 11 commits into from
Jan 11, 2019

Conversation

FrancoisBlavoet
Copy link
Contributor

I am working on improving the accessibility of an app that uses the stripe widget and one issue that our accessibility auditors raised is that the stripe widget does not communicate its content well for non a11y users.

For example the credit card number will spout 1234 1234 1234 1234 when you tap on it, which is not that useful.

So I have modified how accessibility info is populated for this widget, this way :

  • I keep the existing look and feel for non-a11y users
  • a11y users get a description that they can actually use

I had to add a description for the CVC number editText, I have only added it in 2 languages since I am not fluent in all of them 😓

In addition, the 2 first edit text had done as their IME action. it meant that it was extremely hard to get to the next text field as an a11y user. Switching to next fixes it.

I had to fix a couple of lint warnings in order to be able to compile the lib, I have included them in this PR, I can remove them or move them to another PR if necessary.

@FrancoisBlavoet
Copy link
Contributor Author

Strange, it looks like the failing tests do some network requests.
They also fail on master without any of my commits, so it looks like it is unrelated to this PR

Copy link
Collaborator

@mshafrir-stripe mshafrir-stripe left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this. Can you merge latest master to see if it resolves checkstyle failures?

@mshafrir-stripe
Copy link
Collaborator

I ended up merging some of your changes in a separate patch (e.g. android:imeOptions). Please merge latest master.

@FrancoisBlavoet
Copy link
Contributor Author

Done, although you are of course missing translations for these new strings.

Copy link
Collaborator

@mshafrir-stripe mshafrir-stripe left a comment

Choose a reason for hiding this comment

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

Thanks for making these changes. Just a few small comments.

@mshafrir-stripe
Copy link
Collaborator

Done, although you are of course missing translations for these new strings.

Can you add the translations to the other strings files so that this PR passes lint?

@FrancoisBlavoet
Copy link
Contributor Author

@mshafrir-stripe ok, done

@mshafrir-stripe mshafrir-stripe merged commit 0e9d60f into stripe:master Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants