Skip to content

Conversation

@dev-sharma3624
Copy link
Contributor

@dev-sharma3624 dev-sharma3624 commented Nov 6, 2025

🎟️ Tracking

#5951

📔 Objective

  • Fixes Bug: PM-26241
  • The Problem: The on-screen keyboard failed to appear when TalkBack users selected a text field on the "edit item" screen.
  • The Solution: This PR ensures that the text field correctly requests and receives focus when activated via TalkBack, which properly triggers the keyboard to display.
  • Impact: Restores the ability for screen reader users to edit item details, ensuring the feature is accessible.

Test Updates

  • Context: The fix for the TalkBack focus behavior revealed that two unit tests were brittle. They were built on an incorrect assumption that text would always be inserted at the start of the field.

  • Solution: This PR also includes a commit to update these tests, making them more robust and aligning them with the new, correct cursor behavior.

📸 Screenshots

before.webm
after.webm

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 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

@bitwarden-bot
Copy link

Thank you for your contribution! We've added this to our internal tracking system for review.
ID: PM-27869
Link: https://bitwarden.atlassian.net/browse/PM-27869

Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process.

@bitwarden-bot bitwarden-bot changed the title fix/[PM-26241] : draw out keyboard on talkback click [PM-27869] fix/[PM-26241] : draw out keyboard on talkback click Nov 6, 2025
@dev-sharma3624 dev-sharma3624 force-pushed the fix/PM-26241-draw-out-keyboard-on-talkback-click branch from f26115f to ef800d4 Compare November 7, 2025 08:38
@dev-sharma3624
Copy link
Contributor Author

dev-sharma3624 commented Nov 11, 2025

@bitwarden-bot @david-livefront Is there any update on this PR?

@dev-sharma3624 dev-sharma3624 requested a review from a team as a code owner November 12, 2025 11:48
@dev-sharma3624 dev-sharma3624 force-pushed the fix/PM-26241-draw-out-keyboard-on-talkback-click branch 4 times, most recently from e8cff8e to 6392086 Compare November 12, 2025 12:10
@dev-sharma3624 dev-sharma3624 force-pushed the fix/PM-26241-draw-out-keyboard-on-talkback-click branch 2 times, most recently from 7410a73 to 8f3fe49 Compare November 13, 2025 08:15
@github-actions
Copy link
Contributor

github-actions bot commented Nov 13, 2025

Logo
Checkmarx One – Scan Summary & Details8641f514-d275-4a83-bfae-83f94d48f706

Great job! No new security vulnerabilities introduced in this pull request

focused = focusState.isFocused
if (focused) {
textFieldValueState = textFieldValueState.copy(
selection = TextRange(textFieldValueState.text.length),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like there are two tests failing because of the update to text selection here. 🤔

Can you update those

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're absolutely right, thanks for catching that.

The tests were written with an implicit assumption that new text would be inserted at the start of the field.

My fix for the focus behavior moves the cursor to the end, which caused that old test logic to fail. I've just pushed a commit to update the tests to align with this new, correct behavior. 👍

@dev-sharma3624 dev-sharma3624 force-pushed the fix/PM-26241-draw-out-keyboard-on-talkback-click branch from 8f3fe49 to da46c76 Compare November 14, 2025 10:46
@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.99%. Comparing base (55c7ab4) to head (da46c76).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6129   +/-   ##
=======================================
  Coverage   84.99%   84.99%           
=======================================
  Files         723      723           
  Lines       52854    52854           
  Branches     7676     7676           
=======================================
  Hits        44925    44925           
  Misses       5246     5246           
  Partials     2683     2683           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants