Skip to content

Expose the folders sidebar as tabs, not a list - #31176

Open
rezabakhshilaktasaraei wants to merge 6 commits into
telegramdesktop:devfrom
rezabakhshilaktasaraei:folders-enter-on-active
Open

Expose the folders sidebar as tabs, not a list#31176
rezabakhshilaktasaraei wants to merge 6 commits into
telegramdesktop:devfrom
rezabakhshilaktasaraei:folders-enter-on-active

Conversation

@rezabakhshilaktasaraei

@rezabakhshilaktasaraei rezabakhshilaktasaraei commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

The folders sidebar was exposed to screen readers as a list, but the UI calls these folders tabs, so a screen reader user expects the tab role - the topic tabs strip and the horizontal folder tabs already report it. The sidebar container is a tab control now and every real folder a tab, the active one reported as selected; a locked (premium) folder is a tab that opens the Premium box on Enter instead of becoming current, which reads fine in practice. Only the "Edit" button stays a plain button.

The second fix is about where Tab enters the strip: browsing with the arrows used to leave the roving Tab stop on the last browsed folder, so Tabbing back into the sidebar landed there instead of on the active folder. Once focus leaves the list, the stop parks back on the active one, matching the topic tabs strip.

The context menu key also used to open the folder menu at the mouse cursor, which may sit nowhere near the folder or outside the window altogether; a menu asked for from the keyboard is anchored on the folder button now.

The favorite link button (the experimental button at the bottom of the strip that opens a configured link) only painted its label, so a screen reader announced it as an anonymous button - the label doubles as its accessible name now.

The unread dot on the main menu button - unread messages in other accounts - is only painted too; the button carries it as its accessible description now, both on the sidebar variant and on the chat list toggle shown without the sidebar.

Needs desktop-app/lib_ui#348 for the PageTab button role and for the selection state of SideBarButton tabs.

Tested with NVDA on Windows 10: the strip announces as a tab control, folders as tabs with the active one selected, selection is announced on Enter, locked folders open the Premium box, and leaving the sidebar and Tabbing back in lands on the active folder.

Browsing with the arrows used to leave the roving Tab-stop on the last
browsed folder, so Tabbing back into the list landed there instead of
on the active one. Once focus leaves the list, the stop parks back on
the active folder, matching the topic tabs strip.
The UI calls them tabs, so a screen reader user expects the tab role,
like the topic tabs strip and the horizontal folder tabs already have.
A locked folder is a tab that opens the Premium box instead of becoming
current, which testing showed reads fine.
The context menu key opened the menu at the mouse cursor, which may
sit nowhere near the folder or outside the window altogether. A menu
asked for from the keyboard is anchored on the folder button now, the
way the horizontal folder tabs already do it.
The button only painted its label - the resolved chat name, sticker
set or settings section title - so a screen reader announced it as an
anonymous button. The label doubles as the accessible name now, and a
rename of the resolved peer updates it with a change event.
The dot on the main menu button that signals unread messages in other
accounts is only painted. The button now carries that as its accessible
description - on the folders sidebar variant and on the chat list
toggle shown without the sidebar alike.
The keyboard-vs-mouse anchoring moved into lib_ui, so the sidebar can
say it in one line, the same line the tab strips use.
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