Improve Telegram keyboard accessibility and chat announcements - #2
Improve Telegram keyboard accessibility and chat announcements#2serrebidev wants to merge 2 commits into
Conversation
|
Hi @serrebidev, thanks for putting this together — the scope and the accompanying tests/changelog are clearly a lot of careful work. |
|
Thanks for the detailed testing — I reproduced and addressed all three issues in
During live testing I also found and labeled the two remaining unnamed group-chat top-bar controls as Telegram suggestion and Dismiss suggestion. Validation completed:
The updated package is ready for another test pass. Thanks again for the clear report. |
What changed
Alt+1reliably focus Telegram's selected or first chat across current layouts.Alt+Mreliably invoke the main menu in both standard and folder-sidebar layouts.Ctrl+TabandCtrl+Shift+Tabbehavior while announcing the dynamically updated active-chat title.Why
Telegram's current Qt accessibility tree varies by layout and exposes some controls through RTTI-based class chains rather than stable names. Another Telegram-related NVDA add-on can also win app-module discovery, which made these commands disappear. Telegram paints its conversation header rather than exposing it as a dedicated accessible title control, but it does update the top-level window name after native chat switching.
This change uses provider-side UIA queries and targeted point hit-testing for the chat list and menu, a foreground-aware global shortcut bridge for add-on coexistence, structural labels only for known unnamed controls, and Telegram's updated window name for chat announcements.
User impact
NVDA users can move to the chat list, open and navigate the main menu with meaningful labels, and hear the correct chat name when cycling conversations without losing Telegram's native keyboard behavior.
Accessibility testing and diagnosis
@serrebidev reproduced the failures in live Telegram Desktop, captured timestamped NVDA debug logs for each shortcut and menu state, tested successive fixes, and confirmed the final behavior:
Alt+1focuses the chat list and normal arrow-key navigation continues to work.Alt+Mopens the main menu.Ctrl+Tabswitches chats natively and announces the actual new chat title dynamically, including Saved Messages rather than a stale prior title.Validation
uv run python -m unittest discover -s tests -v— 20 tests passed.uv run ruff check .— passed.uv run scons— builttelegramDesktop-0.1.4.nvda-addonsuccessfully.Strict Pyright was also attempted, but this checkout does not include the neighboring NVDA source tree configured in
pyproject.toml; unresolved NVDA imports cause cascading baseline type errors in the app module and the existing dynamic test harness.