Make chat filters sidebar accessible to screen readers
s pull request implements accessibility for the chat filters (folders) sidebar, making it fully navigable and understandable for users with screen readers. Problem Previously, the chat filters sidebar was not exposed correctly to assistive technologies. Screen readers could not identify the list of filters as a single, cohesive widget group (like a tab list), preventing users from effectively navigating between their chat folders using the keyboard. Solution Following the pattern of Qt's complex accessible widgets (like QAccessibleTabBar), this PR introduces a virtual accessibility tree for the filters menu: 1. Window::FiltersMenu Refactoring: The class is converted from a simple manager class into a proper Ui::RpWidget. 2. Accessibility Role: It is assigned the QAccessible::Role::PageTabList role, which correctly identifies it as a list of tabs to screen readers. 3. Virtual Accessibility Tree: ◦ A custom AccessibleFiltersMenu interface is created to manage the list of filters as virtual children. ◦ A lightweight AccessibleFilterButton interface represents each filter button without being a real QWidget, providing necessary information like its name, state (selected), and position on demand. 4. Ui::SideBarButton Update: The Q_OBJECT macro and an active() getter were added to support qobject_cast and state querying required by the accessibility implementation. How to Test 1. Enable a screen reader on your operating system (e.g., Narrator on Windows, VoiceOver on macOS). 2. Launch Telegram Desktop with these changes. 3. Navigate to the chat filters sidebar using the keyboard (e.g., with the Tab key). 4. Expected behavior: ◦ The screen reader should announce the component as a "Tab list" or similar. ◦ You should be able to navigate between the different filters using the arrow keys (up/down or left/right). ◦ As you navigate, the screen reader should announce the name of each filter (e.g., "All Chats", "Unread") and its selected state.
Hello. I am a visually impaired user relying on the NVDA screen reader to use Telegram on Windows. currently, the official Telegram Desktop app has significant accessibility barriers compared to native Windows apps or the Unigram client.
Key Issues:
- Custom UI controls are often not recognized by NVDA.
- Focus management is inconsistent (focus gets lost when switching chats).
- New incoming messages are not automatically announced via Aria-live or UIA notification events.
- Keyboard navigation (Tab/Arrow keys) does not reach all interactive elements.
Request: Please consider implementing full Microsoft UI Automation (UIA) support for the custom Qt widgets used in the app. This is crucial for blind users to access the platform independently.
Environment: OS: Windows 10/11 Screen Reader: NVDA (latest version) App Version: Latest Telegram Desktop
Hello. I am a visually impaired user relying on the NVDA screen reader to use Telegram on Windows. currently, the official Telegram Desktop app has significant accessibility barriers compared to native Windows apps or the Unigram client.
Key Issues:
- Custom UI controls are often not recognized by NVDA.
- Focus management is inconsistent (focus gets lost when switching chats).
- New incoming messages are not automatically announced via Aria-live or UIA notification events.
- Keyboard navigation (Tab/Arrow keys) does not reach all interactive elements.
Request: Please consider implementing full Microsoft UI Automation (UIA) support for the custom Qt widgets used in the app. This is crucial for blind users to access the platform independently.
Environment: OS: Windows 10/11 Screen Reader: NVDA (latest version) App Version: Latest Telegram Desktop
this is a pull request that is working on make telegram desktop more screen reader friendly, when it's merged your comment will be lost, i suggest you mention anything missing at https://github.com/telegramdesktop/tdesktop/issues/476