Skip to content

fix: keyboard navigation in conversations UI [WPB-14665]#4837

Open
Garzas wants to merge 1 commit into
developfrom
fix/keyboard-navigation-conversations
Open

fix: keyboard navigation in conversations UI [WPB-14665]#4837
Garzas wants to merge 1 commit into
developfrom
fix/keyboard-navigation-conversations

Conversation

@Garzas
Copy link
Copy Markdown
Contributor

@Garzas Garzas commented May 19, 2026


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

Fixed issues:

  • Search fields could receive keyboard input, but search results and related controls were not reliably reachable or actionable with keyboard navigation.
  • The home search field could trap focus or make surrounding controls, such as profile and New/FAB, difficult to reach in the expected TAB order.
  • In chat, typed messages could not be sent with ENTER.
  • Composer additional options and attachment actions were not reliably reachable after leaving the message input with keyboard navigation.
  • Rich text options could close the whole composer/view on ESC/Back instead of closing only the rich text submenu.
  • Some controls were reachable only backwards with SHIFT+TAB, but not forwards with TAB.

Causes

The affected Compose components relied mostly on default focus traversal. This was not enough for dynamic UI states such as active search, hidden composer actions, IME-dependent additional options, popups, and animated attachment menus.

Some key events were also handled at wrapper level instead of the actual text input or focusable control, which made keyboard behavior inconsistent.

Solutions

  • Added explicit focus requesters and focusProperties for the Conversations home top bar, profile action, FAB/New button, search field, and search back button.
  • Updated search handling so keyboard focus opens the search field, shows the keyboard, supports backwards focus to the back button, and allows TAB to continue into the conversation/search results list.
  • Added reusable onEscapeOrBackKey modifier for closing keyboard-driven UI states consistently.
  • Added support for sending composer text with ENTER, while keeping SHIFT+ENTER for newline input.
  • Added keyboard navigation from the composer text field into additional options while keeping the options visible after focus leaves the input.
  • Added initial keyboard focus handling for additional options and attachment option grids.
  • Made attachment/additional option buttons receive focus directly on the real button instead of wrapper containers.
  • Added Back/ESC handling for rich text options so it exits only the rich text submenu.
  • Extracted composer keyboard navigation logic into a dedicated file to keep the composer UI code smaller and easier to follow.

@Garzas Garzas requested review from saleniuk and sbakhtiarov May 19, 2026 13:53
@Garzas Garzas self-assigned this May 19, 2026
@sonarqubecloud
Copy link
Copy Markdown

canSendMessage: Boolean,
onSendButtonClicked: () -> Unit,
) {
if (event.isShiftPressed) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should probably disable "send on enter" when input field is in "expanded" mode.

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