Add a selection event for a painted list child - #345
Open
rezabakhshilaktasaraei wants to merge 1 commit into
Open
Add a selection event for a painted list child#345rezabakhshilaktasaraei wants to merge 1 commit into
rezabakhshilaktasaraei wants to merge 1 commit into
Conversation
This was referenced Aug 25, 2026
A painted list had no way to tell a screen reader that a row became the current one, or stopped being: the Windows bridge reads only the checked flag out of a state change and ignores the selected one, so the folder tabs went silent where the folders that are real widgets say "selected" - SideBarButton raises the selection event itself.
rezabakhshilaktasaraei
force-pushed
the
accessible-child-selection-event
branch
from
August 25, 2026 07:02
1076ff6 to
3656218
Compare
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.
A painted list has no way to tell a screen reader that a row became the current one, or stopped being. accessibilityChildStateChanged() with the selected flag looks like it should do it, but on Windows the bridge reads only the checked flag out of a state change (qwindowsuiamainprovider.cpp, notifyStateChange). So the chat folder tabs stayed silent on activation, while the folders that are real widgets say "selected" - SideBarButton::setActive() raises the selection event itself.
accessibilityChildSelectionChanged(index) does the same for a virtual child. It raises SelectionAdd for a deselection as well, which reads odd but is deliberate: SelectionRemove is mapped nowhere in the bridge (in qtbase dev either, not just 5.15), and a screen reader reads the new value off the child and announces the difference - so it only needs telling that the selection of this child changed. Verified in a log: NVDA answers the event with a state comparison, saying just "selected" or "not selected", and stays quiet when the value did not actually change.
Used by telegramdesktop/tdesktop#31097 when a slider section is activated, and by telegramdesktop/tdesktop#31171 when a message is selected or deselected. Both verified with NVDA on Windows 10.