-
Notifications
You must be signed in to change notification settings - Fork 664
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 voice over for invalid input #10272
base: master
Are you sure you want to change the base?
Conversation
Diffuse output:
APK
DEX
|
@@ -139,6 +140,7 @@ internal fun CompatTextField( | |||
leadingIcon: @Composable (() -> Unit)? = null, | |||
trailingIcon: @Composable (() -> Unit)? = null, | |||
isError: Boolean = false, | |||
errorString: String?, |
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 think that typically we call this errorMessage
or just error
, the String
part is implied from the type. Can you update the name here and elsewhere?
Also, on this one can you update the javadoc? We have javadoc for all the other fields so it'd be nice to keep that up
@@ -451,4 +453,38 @@ internal class PaymentSheetTest { | |||
|
|||
testContext.markTestSucceeded() | |||
} | |||
|
|||
@Test | |||
fun testCardDetailsErrorMessageAccessibility() = runPaymentSheetTest( |
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.
a couple ideas to improve this:
- could we have separate tests for the card number field and the expiration date field? if the card number field case started failing, the test would stop at that assert and we wouldn't immediately know whether the expiration date field case was also failing
- wdyt of including these tests in a non-network test test class? These tests take a long time to run and are also more prone to flakiness. We really don't need to test any of the set up (ie the elements session response) to test this case, so I think this might be more appropriate to test in something more similar to a unit test, e.g. VerticalModeFormUITest
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.
VerticalModeFormUITest
seems reasonable. I am not sure if this is the best place but I didn't find a better one though.
Summary
https://jira.corp.stripe.com/browse/MOBILESDK-2675
https://jira.corp.stripe.com/browse/MOBILESDK-2676
Use the error message shown on UI instead of the default one for voice over.
Motivation
#9525
Testing
Screenshots
Changelog