Skip to content

Commit

Permalink
Fix TalkBack crash in CardInputWidget
Browse files Browse the repository at this point in the history
**Summary**
`android:accessibilityTraversalAfter` on both
the expiration date and CVC input views were
pointing to the wrong views.

**Testing**
On a Google Pixel, confirmed that TalkBack is
no longer crashing when navigating through
the input views of CardInputWidget.

**Motivation**
Fixes #682
  • Loading branch information
mshafrir-stripe committed Feb 28, 2019
1 parent 8379ddd commit d5c6d13
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions stripe/res/layout/card_input_widget.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
android:hint="@string/expiry_date_hint"
tools:ignore="UnusedAttribute"
tools:importantForAccessibility="yes"
android:accessibilityTraversalAfter="@+id/et_expiry_date"
android:accessibilityTraversalBefore="@id/et_card_number"
android:accessibilityTraversalAfter="@+id/et_cvc_number"
android:nextFocusRight="@+id/et_cvc_number"
android:nextFocusForward="@+id/et_cvc_number"
android:nextFocusDown="@+id/et_cvc_number"
Expand All @@ -107,7 +107,6 @@
android:layout_height="wrap_content"
tools:ignore="UnusedAttribute"
tools:importantForAccessibility="yes"
android:accessibilityTraversalAfter="@+id/et_expiry_date"
android:nextFocusLeft="@id/et_expiry_date"
android:nextFocusUp="@id/et_expiry_date"
android:background="@android:color/transparent"
Expand Down

0 comments on commit d5c6d13

Please sign in to comment.