-
Notifications
You must be signed in to change notification settings - Fork 663
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
Conversation
Strange, it looks like the failing tests do some network requests. |
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 submitting this. Can you merge latest master to see if it resolves checkstyle failures?
stripe/src/main/java/com/stripe/android/view/ExpiryDateEditText.java
Outdated
Show resolved
Hide resolved
stripe/src/main/java/com/stripe/android/view/CardNumberEditText.java
Outdated
Show resolved
Hide resolved
stripe/src/main/java/com/stripe/android/view/CardInputWidget.java
Outdated
Show resolved
Hide resolved
I ended up merging some of your changes in a separate patch (e.g. |
Done, although you are of course missing translations for these new strings. |
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 making these changes. Just a few small comments.
stripe/src/main/java/com/stripe/android/view/ExpiryDateEditText.java
Outdated
Show resolved
Hide resolved
stripe/src/main/java/com/stripe/android/view/CardNumberEditText.java
Outdated
Show resolved
Hide resolved
stripe/src/main/java/com/stripe/android/view/CardInputWidget.java
Outdated
Show resolved
Hide resolved
Can you add the translations to the other strings files so that this PR passes lint? |
@mshafrir-stripe ok, done |
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 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 tonext
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.