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

Fix SavedPaymentMethod accessibility issue #9874

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

cttsai-stripe
Copy link
Contributor

@cttsai-stripe cttsai-stripe commented Jan 8, 2025

Summary

Modify SavedPaymentMethodTab click group to match the accessibility requirements

Motivation

https://jira.corp.stripe.com/browse/MOBILESDK-2678
This pull request aims to improve accessibility for VoiceOver users on the payment method selection screen. It ensures that when the "Add" tab is selected, VoiceOver reads out "Button, double tap to select, Add new card," and provides clear identification of saved payment methods by announcing the card name or number when selected. These enhancements will facilitate better navigation and understanding for users relying on screen readers.

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
https://github.com/user-attachments/assets/0f732223-08a2-40a4-a273-1390d4c43db8 https://github.com/user-attachments/assets/000e91d2-d3a8-47b9-8253-b00c0a077063

Changelog

@cttsai-stripe cttsai-stripe changed the title Modify SavedPaymentMethodTab click group to match the accessibility r… Fix SavedPaymentMethod accessibility issue Jan 8, 2025
Copy link
Contributor

github-actions bot commented Jan 8, 2025

Diffuse output:

OLD: identity-example-release-base.apk (signature: V1, V2)
NEW: identity-example-release-pr.apk (signature: V1, V2)

          │          compressed           │         uncompressed         
          ├───────────┬───────────┬───────┼───────────┬───────────┬──────
 APK      │ old       │ new       │ diff  │ old       │ new       │ diff 
──────────┼───────────┼───────────┼───────┼───────────┼───────────┼──────
      dex │     2 MiB │     2 MiB │   0 B │   4.1 MiB │   4.1 MiB │  0 B 
     arsc │     1 MiB │     1 MiB │   0 B │     1 MiB │     1 MiB │  0 B 
 manifest │   2.3 KiB │   2.3 KiB │   0 B │     8 KiB │     8 KiB │  0 B 
      res │ 301.8 KiB │ 301.8 KiB │   0 B │ 455.5 KiB │ 455.5 KiB │  0 B 
   native │   6.2 MiB │   6.2 MiB │   0 B │  15.8 MiB │  15.8 MiB │  0 B 
    asset │   7.2 KiB │   7.2 KiB │   0 B │   6.9 KiB │   6.9 KiB │  0 B 
    other │  90.2 KiB │  90.3 KiB │ +13 B │ 170.3 KiB │ 170.3 KiB │  0 B 
──────────┼───────────┼───────────┼───────┼───────────┼───────────┼──────
    total │   9.6 MiB │   9.6 MiB │ +13 B │  21.5 MiB │  21.5 MiB │  0 B 

 DEX     │ old   │ new   │ diff      
─────────┼───────┼───────┼───────────
   files │     1 │     1 │ 0         
 strings │ 19971 │ 19971 │ 0 (+0 -0) 
   types │  6191 │  6191 │ 0 (+0 -0) 
 classes │  4982 │  4982 │ 0 (+0 -0) 
 methods │ 29771 │ 29771 │ 0 (+0 -0) 
  fields │ 17541 │ 17541 │ 0 (+0 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  164 │  164 │  0   
 entries │ 3622 │ 3622 │  0
APK
    compressed    │   uncompressed   │                                           
──────────┬───────┼───────────┬──────┤                                           
 size     │ diff  │ size      │ diff │ path                                      
──────────┼───────┼───────────┼──────┼───────────────────────────────────────────
 28.5 KiB │ +10 B │  62.9 KiB │  0 B │ ∆ META-INF/CERT.SF                        
 25.3 KiB │  +3 B │  62.8 KiB │  0 B │ ∆ META-INF/MANIFEST.MF                    
    272 B │  +1 B │     120 B │  0 B │ ∆ META-INF/version-control-info.textproto 
  1.2 KiB │  -1 B │   1.2 KiB │  0 B │ ∆ META-INF/CERT.RSA                       
──────────┼───────┼───────────┼──────┼───────────────────────────────────────────
 55.2 KiB │ +13 B │ 127.1 KiB │  0 B │ (total)

@cttsai-stripe cttsai-stripe marked this pull request as ready for review January 8, 2025 21:22
@cttsai-stripe cttsai-stripe requested review from a team as code owners January 8, 2025 21:22
viewWidth: Dp,
isSelected: Boolean,
shouldShowModifyBadge: Boolean,
isEnabled: Boolean,
isClickable: Boolean = isEnabled,
iconRes: Int,
modifier: Modifier = Modifier,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might be worth reverting this change to minimize the diff to only necessary changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The lint check warns me about "modifier not being the first parameter" when committing. Maybe we could keep it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's the first optional parameter that it's warning about, not that it has to be exactly the first parameter. I think in general it's worth doing a separate PR for these types of things, but I'm not blocking on it if you want to ship it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see. Will separate this kind of modification next time. Merging now to avoid unnecessary check rerun.

@cttsai-stripe cttsai-stripe merged commit 0236877 into master Jan 8, 2025
13 checks passed
@cttsai-stripe cttsai-stripe deleted the cttsai/saved_pm_tab_accessibility branch January 8, 2025 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants