Skip to content

Make the chat folder tabs and the chat list column accessible - #31098

Open
rezabakhshilaktasaraei wants to merge 6 commits into
telegramdesktop:devfrom
rezabakhshilaktasaraei:chat-filters-tabs-accessibility
Open

Make the chat folder tabs and the chat list column accessible#31098
rezabakhshilaktasaraei wants to merge 6 commits into
telegramdesktop:devfrom
rezabakhshilaktasaraei:chat-filters-tabs-accessibility

Conversation

@rezabakhshilaktasaraei

@rezabakhshilaktasaraei rezabakhshilaktasaraei commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Depends on #31097 and builds on top of it: that PR exposes the painted sections of Ui::DiscreteSlider as accessible tabs, this one completes the chat folder tabs strip specifically. It contains no code from #31097 - it only compiles once that lands, since it overrides a virtual and subscribes to a producer introduced there. With #31097 the strips switch to the tab the arrows land on; the folder tabs keep the browse-then-commit model through the opt-out added there (the last commit here), since switching folders reloads the chat list and the strip may include locked ones - the arrows only browse and announce, Enter or Space commits.

Keyboard or screen reader activation of a locked (premium) folder now behaves like a click on it: the premium promo opens instead of switching to a folder the user cannot use. Folder tab names include the unread count via the existing lng_filter_unread_chats key and locked folders get the lng_sr_folder_locked name and description, mirroring the folders sidebar. Unread count changes fire a name-changed event so a screen reader focused on a tab picks them up, and the strip container is named with lng_filters_title instead of being announced as a bare tab control. Browsing with arrows also scrolls the strip to keep the browsed tab visible, reusing the same scrollToIndex animation the strip already uses when the active filter changes. No new lang keys.

The folder context menu (edit, mark as read, remove) was reachable with a right click only. contextMenuEvent looked up the tab under e->pos(), but a menu asked for from the keyboard comes with the center of an empty input method rect, so the lookup ran past every section and the request was dropped - the menu key did nothing. A keyboard request now takes the tab the browse position is on, or the active one when it is on none, and skips locked folders like the mouse path does. The menu is also anchored on that tab (through Ui::ContextMenuPosition from desktop-app/lib_ui#348) instead of the mouse cursor, which may sit nowhere near the strip; a mouse-invoked menu keeps opening at the cursor.

The third commit orders the chat list column in the Tab chain by position, with setVisualTabOrder. The bars above the list and the folder tabs strip are created only once they are needed, long after the list and the buttons below it, so Tab used to reach the folder tabs after the list instead of before it. It now follows the column: main menu, search, the bars, the folder tabs, the list, jump to top, the buttons at the bottom.

Tested with NVDA on Windows 10 with both PRs applied: browsing the folder tabs reads titles with unread counts and scrolls overflowing tabs into view, Enter activates the browsed folder or opens the premium box on a locked one, the menu key opens the menu of the browsed folder, and Tab walks the column top to bottom.

@rezabakhshilaktasaraei
rezabakhshilaktasaraei force-pushed the chat-filters-tabs-accessibility branch 2 times, most recently from f6a73fd to 1120827 Compare August 22, 2026 01:07
@rezabakhshilaktasaraei rezabakhshilaktasaraei changed the title Add accessible names and locked folder handling to chat filters tabs Make the chat folder tabs and the chat list column accessible Aug 22, 2026
The context menu key already picked the browsed tab, but the menu
still popped at the mouse cursor, which may sit nowhere near the tab
or outside the window altogether. The slider now sends the position to
show the menu at along with the tab index - the tab itself for a
keyboard-invoked menu, the cursor as before for a mouse-invoked one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant