Skip to content

[Accessibility] Scale passcode PIN and keypad text - #156

Draft
joashrajin wants to merge 1 commit into
trunkfrom
codex/scale-passcode-text
Draft

joashrajin wants to merge 1 commit into
trunkfrom
codex/scale-passcode-text

Conversation

@joashrajin

Copy link
Copy Markdown
Owner

Fix

Simplenote's app-level passcode styles override the embedded PasscodeLock text sizes with 24dp keypad text and 34dp PIN text. Because dp does not respond to the system font scale, those controls remain fixed when a user increases text size.

Keep the numeric sizes unchanged and switch the two dimensions to sp. Both passcode activities use the shared keyboard resource, whose phone and sw600dp variants consume these styles. Authentication, keypad actions, layout structure, prompt text, and fingerprint behavior are unchanged.

Test

  • Added a Robolectric regression that inflates the production passcode keyboard under the app's passcode theme and verifies PIN/keypad scaling on API 23 and API 35.
  • Ran the unchanged seven-case test source against exact fork trunk and the fix; the top-level compiled test class was byte-identical (SHA-256 2ae0a8c0ffa9790437409aad1393a6a2deaa6166f57086a7392ed590a57f992c):
    • Base: 3/7 passed; all four large-font scaling assertions failed while the three geometry guards passed.
    • Fixed: 7/7 passed.
  • Verified selected measured layouts at 360dp × 640dp with font scale 1.3 on API 23 and font scale 2 on API 35, plus the sw600dp landscape layout at 960dp × 600dp and font scale 2. The tested controls remained contained, with PIN and digit text unellipsized on one line.
  • Ran the forced verification matrix: 169/169 tasks executed; 311/311 JVM tests passed across 35 suites; debug Android-test sources compiled to 32 Kotlin and 17 Java classes; and all 14 Roborazzi references were unchanged.
  • Built fresh debug/release APKs, the release AAB, and release mapping. Both APK resource tables contain 24sp/34sp and bind them through the passcode styles. All archives passed ZIP integrity checks. The debug APK verified with v1/v2 Android Debug signing; the local release APK and AAB are unsigned.
  • Ran :Simplenote:lintDebug from scratch: 70/70 tasks, 0 errors, 263 existing warnings, and 1 hint. The two modified resources retain pre-existing UnusedResources warnings; the new test has no finding.

The focused fixture inflates and measures resources with exact mdpi specifications. It does not launch either passcode Activity, apply real window insets, run on an emulator/device, or cover every locale, display size, or custom font scale.

Review

Please focus on retaining the existing 24/34 default-scale sizes while allowing the PIN and digit keys to follow platform font scaling.

A complete scan of 125 open fork PRs and 8 open upstream PRs found no exact changed-path overlap. Fork PR #56 changes the passcode layouts and runtime safe-area handling; it is path-disjoint and complementary, but its inset/device coverage remains relevant when the slices are integrated.

Release

Passcode PIN and keypad text now scale with the system font-size setting.

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.

1 participant