Leave the painted list focus announcement to the platform - #31169
Open
rezabakhshilaktasaraei wants to merge 1 commit into
Open
Leave the painted list focus announcement to the platform#31169rezabakhshilaktasaraei wants to merge 1 commit into
rezabakhshilaktasaraei wants to merge 1 commit into
Conversation
Taking keyboard focus raises a focus event which the platform hands to focusChild(), so the chat list, the message lists, the countries and the languages lists announced their current row twice: once from the event and once from focusInEvent. Keep only the platform's announcement and make sure the row it resolves to is picked before focus-in returns - for the message lists that means splitting the announcing helper, whose other caller (a chat focused before its first messages arrived) has no focus event to rely on.
rezabakhshilaktasaraei
marked this pull request as ready for review
August 24, 2026 11:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tabbing into the chat list, a message list, the countries list or the languages list announces the current row twice. Taking keyboard focus raises a focus event which the platform resolves through focusChild() - the current row - and each of these lists announced that row from focusInEvent as well.
Only the platform's announcement is left. What focus-in still has to do is point at the right row before it returns: the chat list, the countries and the languages lists already pick it there, and for the two message lists the helper that resolves the focused message - following it across slice changes, or picking the first unread / the newest one - is split from the announcing one, whose other caller (a chat focused before its first messages arrived) has no focus event to rely on and keeps announcing directly.
Needs desktop-app/patches#263 on Windows: Qt 5.15 forwards a focus event to focusChild() only for an accessible exposing a table interface, upstream generalized that to any element with children in 6.2.
Tested with NVDA on Windows 10 against a Qt 5.15.19 build with that patch: all five lists announce their current row once when focus arrives, and browsing inside them with the arrows is unchanged. The list container keeps reporting the focused state, since it is the widget that actually holds keyboard focus - the row is what the focus event and GetFocus resolve to.