make painted dialog rows screen-reader accessible #30169
+173
−1
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.
This PR makes the dialogs list accessible by exposing painted dialog rows (non-QWidget items) as virtual accessibility children. The goal is for screen readers to be able to navigate the chat list as a real list with proper list items, names, and geometry—even though rows are rendered manually.
What changed
•
Expose dialog rows as accessibility children
•
Dialogs::InnerWidget now implements:
•
accessibilityChildCount() based on _shownList->size()
•
accessibilityChildInterface(index) to return a Ui::Accessible::Item for the row at that index
•
accessibilityChildName(index) to provide a meaningful, user-facing label per row
•
Added rowAtIndex() helper for safe indexed access to _shownList.
•
Make Dialogs::Row accessible
•
Dialogs::Row now implements Ui::Accessible::AccessibleItemWrap so it can be represented via Ui::Accessible::Item.
•
Provides:
•
accessibilityRole() → ListItem
•
accessibilityRect() → row rectangle inside the parent widget (based on _top/_height)
•
accessibilityParentWidget() and accessibilityIndex() for correct parent/index reporting.
•
Stores runtime accessibility context on the row:
•
parent widget pointer
•
accessibility index (fallback to _index)
•
Better row labels for screen readers
•
Topics: "Topic, <title>" (including General topic handling)
•
Folders: "Folder, "
•
Saved Messages sublists: "Saved Messages, "
•
Chat type prefixes for non-private chats:
•
Channel / Group / Bot, etc., falling back to the peer name when unknown.
Why
The dialogs list is largely custom-painted, so individual rows do not exist as Qt widgets and are invisible to assistive technologies by default. By representing rows as QAccessibleInterface items, we make the list navigable and understandable for screen readers without refactoring UI composition.
Testing
•
Manual verification with a screen reader:
•
rows appear as list items under the dialogs list
•
navigation reads correct names (topic/folder/channel/group/bot/user)
•
geometry matches row position for hit-testing and focus tracking
Notes / follow-ups