braintree / android-card-form

A ready-made card form layout that can be included in your Android app, making it easy to accept credit and debit cards.
MIT License
366 stars 130 forks source link

Supported Card Types Accessibility #112

Closed sarahkoop closed 2 years ago

sarahkoop commented 2 years ago

Summary of changes

CardForm with SupportedCardTypesView

Screen Shot 2021-10-15 at 3 36 22 PM

CardForm with AccessibleSupportedCardTypesView

Screen Shot 2021-10-15 at 4 05 29 PM

Drop-in with SupportedCardTypesView

Screen Shot 2021-10-15 at 3 31 04 PM

Drop-in with AccessibleSupportedCardTypesView

Screen Shot 2021-10-15 at 4 05 11 PM

Checklist

Authors

List GitHub usernames for everyone who contributed to this pull request.

  • @sarahkoop
sshropshire commented 2 years ago

@sarahkoop this is awesome. I noticed an alignment change from left to centered of the available card types on DropIn, is that a result of the new AccessibleSupportedCardTypesView?

sarahkoop commented 2 years ago

@sarahkoop this is awesome. I noticed an alignment change from left to centered of the available card types on DropIn, is that a result of the new AccessibleSupportedCardTypesView?

Yeah that's a result of using FlexboxLayoutManager within AccessibleSupportedCardTypesView where I set JustifyContent.CENTER on the flexbox layout programatically. If we want the flexibility to align center in card form and align left in Drop-in I could make that a param. I preferred the centering visually - what do you think?

sarahkoop commented 2 years ago

@demerino I wasn't able to find a good example of this to compare, but I did test grouping the cards together for the screen reader. I think that would take a little more investigation since it caused some unusual tab navigation behavior in Drop-in. I can create a card to look into that further in the future.