Skip to content

fix: improve keyboard focus order in search screens [WPB-14781]#4866

Open
Garzas wants to merge 2 commits into
developfrom
fix/android-keyboard-focus-order-search-users
Open

fix: improve keyboard focus order in search screens [WPB-14781]#4866
Garzas wants to merge 2 commits into
developfrom
fix/android-keyboard-focus-order-search-users

Conversation

@Garzas
Copy link
Copy Markdown
Contributor

@Garzas Garzas commented May 25, 2026

https://wearezeta.atlassian.net/browse/WPB-14781


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

  • Keyboard focus order was inconsistent on search-based screens.
  • Search conversations, Search for people, and related search fields could trap focus or skip visible controls.
  • Inactive search fields opened the keyboard immediately, which could hide bottom actions such as FAB, New Group, or Continue.
  • Some actions after search results, including FAB, first contact/conversation rows, and bottom buttons, were not reachable in the expected sequential TAB order.
  • Screens with tabs could move focus unpredictably between search, tabs, list content, and bottom actions.

Causes

The affected Compose screens relied partly on default focus traversal. That was not reliable with dynamic layouts such as collapsing top bars, inactive/active search states, animated bottom actions, tabs, lazy lists, and hidden keyboard-dependent UI.

Some focus targets existed in the Compose tree but did not map to visible actionable controls, which caused “empty” TAB steps.

Solutions

  • Added explicit FocusRequester and focusProperties wiring for search fields, navigation buttons, FAB, first list items, tabs, and bottom actions.
  • Updated inactive SearchTopBar behavior so keyboard focus does not immediately open the keyboard; search activates on click, Enter/Space, or printable keyboard input.
  • Added focus routing from Home search to FAB/list and from FAB directly to the first conversation row.
  • Added focus routing from people search to the first visible contact and then to New Group/Continue.
  • Restored tab focus handling for screens with People/Services tabs.
  • Kept visible focus indicators by using the existing text field interaction styling instead of custom borders.
keyboard_navigation.mp4

@Garzas Garzas requested review from saleniuk and yamilmedina May 25, 2026 11:25
@Garzas Garzas self-assigned this May 25, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 51.76%. Comparing base (c1b6eea) to head (1e70e81).
⚠️ Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
...kotlin/com/wire/android/ui/home/HomeStateHolder.kt 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4866   +/-   ##
========================================
  Coverage    51.75%   51.76%           
========================================
  Files          612      612           
  Lines        21258    21266    +8     
  Branches      3411     3412    +1     
========================================
+ Hits         11003    11009    +6     
- Misses        9236     9238    +2     
  Partials      1019     1019           
Files with missing lines Coverage Δ
...kotlin/com/wire/android/ui/home/HomeStateHolder.kt 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1b6eea...1e70e81. Read the comment docs.

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

@sonarqubecloud
Copy link
Copy Markdown

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants