Skip to content

Add screen reader support for message list#30306

Open
rezabakhshilaktasaraei wants to merge 1 commit intotelegramdesktop:devfrom
rezabakhshilaktasaraei:acc-message-list
Open

Add screen reader support for message list#30306
rezabakhshilaktasaraei wants to merge 1 commit intotelegramdesktop:devfrom
rezabakhshilaktasaraei:acc-message-list

Conversation

@rezabakhshilaktasaraei
Copy link
Contributor

@rezabakhshilaktasaraei rezabakhshilaktasaraei commented Feb 18, 2026

Summary

Exposes each message bubble as a virtual accessibility child, making the message history fully navigable by screen readers.

Changes (history_inner_widget.cpp/h, history_view_send_action.h)

  • Overrides accessibilityChildCount(), accessibilityChildName(), accessibilityChildRect(), accessibilityChildState(), accessibilityChildRole(), and column sub-item methods.
  • Each message becomes a ListItem with a detailed description:
    • Sender name (or "Me"), forwarded-from, reply-to context
    • Message text content with custom emoji descriptions
    • Media metadata: photo/video dimensions, file name/size, audio artist/title/duration
    • Status: seen/not seen, played/not played, edited, pinned, views count
    • Reactions list, via-bot attribution, post signature
    • Web page preview: site name, title, description
    • Poll: question, options, vote count, status
    • Contacts, locations, stickers, games, invoices, gifts, giveaways, todo lists
  • 46 multi-column sub-items for structured per-field screen reader access
  • Fires accessibilityChildFocused() on keyboard navigation.
  • Keyboard context menu (Applications / Shift+F10) now correctly targets the accessibility-focused message instead of the last mouse-hovered message.
  • Arrow key navigation now scrolls to keep the focused message visible.
  • PageUp/PageDown support for jumping through messages by one page height.
  • Focused message index is now tracked by item pointer (_accessibilityFocusedItem) and revalidated when the list changes (new messages, deletions, history loading), preventing stale index references.

Dependencies

  • Requires lib_ui#278 for Accessible::Item infrastructure.

New lang keys

~80 new lng_sr_message_* keys + shared delivery status keys (lng_sr_chat_sending/sent/failed/received).

Test plan

  • Navigate message list with arrow keys — screen reader announces sender, text, media info, and status
  • Verify forwarded messages, replies, and web previews are announced correctly
  • Verify media messages report type, dimensions, file size, duration as applicable
  • Verify hit-testing: clicking a message with screen reader cursor selects it
  • Open context menu with Applications key or Shift+F10 — menu actions (reply, edit, etc.) target the focused message, not the last mouse-hovered one
  • Navigate up/down with arrow keys past the visible area — view scrolls to keep the focused message on screen
  • Use PageUp/PageDown to jump through messages by one visible page
  • Receive new messages while navigating — focused message stays correct after list changes
Expose each message bubble as a virtual accessibility child so
screen readers can navigate the message history.

Each message reports: sender, text, media metadata, reply context,
forward info, delivery/seen status, reactions, views, and more.

Multi-column sub-items provide structured per-field access.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant