-
Notifications
You must be signed in to change notification settings - Fork 914
[PM-29014] Update BitwardenPasswordField semantics to support accessibility for visible passwords #6222
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
base: main
Are you sure you want to change the base?
Conversation
…visible passwords Improve accessibility support in `BitwardenPasswordField` by ensuring Talkback can read the password aloud when the user chooses to make it visible, while explicitly marking the content as sensitive data. Behavioral changes: * When the "show password" toggle is active, Talkback will now read the actual password text instead of silence or obfuscated characters. This behavior occurs regardless of the system-wide "Speak Passwords" setting due to the custom visual transformation usage. * The field is semantically marked as containing sensitive data. Specific changes: * Apply a `semantics` modifier to the internal `TextField` in `BitwardenPasswordField`. * Set `contentDescription` to the actual text value only when `showPassword` is true; otherwise, it defaults to an empty string. * Set the `isSensitiveData` semantic property to `true`.
|
Great job! No new security vulnerabilities introduced in this pull request |
|
Claude finished @SaintPatrck's task —— View job Code Review CompleteI've reviewed the accessibility changes to 🎯 Overall Assessment👍 Great addition - This change addresses an important accessibility gap for Talkback users who need to verify passwords when they're visible. Security Analysis
|
| Category | Status | Notes |
|---|---|---|
| Security | System setting override should be validated | |
| Accessibility | 👍 Correct | Implementation is technically sound |
| Code Style | 👍 Excellent | Comments are exemplary |
| Architecture | 👍 Good | Follows project patterns |
| Testing | 🌱 Future Work | Consider adding accessibility tests |
Recommended Actions
Before merge:
- ❓ Clarify & confirm that overriding "Speak Passwords" is the desired behavior from UX/security perspective
- 📝 Consider documenting this behavior in user-facing accessibility documentation
Future improvements:
- 🌱 Add unit tests for semantics properties
- 🌱 Consider adding an in-app setting for Talkback password reading
- 🌱 Evaluate applying similar patterns to other sensitive fields
Final Verdict
This is a well-implemented accessibility enhancement with excellent code quality and documentation. The code itself is ready from a technical perspective. The primary consideration is the behavioral decision to override system settings - if that's been validated by product/UX, this is good to merge. 👍
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6222 +/- ##
=======================================
Coverage 85.38% 85.38%
=======================================
Files 755 755
Lines 54109 54112 +3
Branches 7795 7797 +2
=======================================
+ Hits 46203 46206 +3
Misses 5195 5195
Partials 2711 2711 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Holding for product review & approval. CC @maxkpower |
Simplify the conditional logic used to set the `contentDescription` for the `BitwardenPasswordField`.
The previous implementation used a double negative (`takeUnless { !showPassword }`) to determine if the password text should be exposed to accessibility services. This change replaces it with the more direct and readable `takeIf { showPassword }`, ensuring the content description is only populated when the password is explicitly visible.

🎟️ Tracking
PM-29014
Relates to #6212
📔 Objective
Improve accessibility support in
BitwardenPasswordFieldby ensuring Talkback can read the password aloud when the user chooses to make it visible, while explicitly marking the content as sensitive data.Behavioral changes:
Specific changes:
semanticsmodifier to the internalTextFieldinBitwardenPasswordField.contentDescriptionto the actual text value only whenshowPasswordis true; otherwise, it defaults to an empty string.isSensitiveDatasemantic property totrue.📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes