Skip to content

Accessibility: announce context menu open to screen readers - #357

Open
hesam-oxe wants to merge 2 commits into
desktop-app:masterfrom
hesam-oxe:feat/accessibility-complete-overhaul
Open

Accessibility: announce context menu open to screen readers#357
hesam-oxe wants to merge 2 commits into
desktop-app:masterfrom
hesam-oxe:feat/accessibility-complete-overhaul

Conversation

@hesam-oxe

@hesam-oxe hesam-oxe commented Aug 29, 2026

Copy link
Copy Markdown

Summary

When a Ui::PopupMenu opens while a screen reader is active, fire a QAccessible::Focus event on the menu so NVDA/JAWS/ORCA announce it immediately (part of issue telegramdesktop/tdesktop#476).

This is a self-contained change: it only emits an accessibility event in PopupMenu::showPrepared() when Ui::ScreenReaderModeActive() is true; no menu logic or focus behavior is altered.

Changes

  • ui/widgets/popup_menu.cpp: include <QtGui/QAccessible> and fire QAccessible::Focus on the menu after show under a screen reader.

Related


Verification status

Phase 2-4 features implemented. Full functional verification requires a Qt6 build environment (the desktop-app Linux build compiles patched Qt6 from source inside Docker, which was not available in the implementation environment). CI validation requested. The lib_ui submodule must be updated to this branch head for the tdesktop side to build against the new accessible sub-item framework.

AbstractButton now exposes an accessible name from an explicit
setAccessibleName() or, as a fallback, its tooltip, so icon-only
buttons (close, mute, record, play) are named for screen readers
without per-call-site fixes. FlatButton and SettingsButton also set
the name from their text.
When a PopupMenu opens while a screen reader is active, fire a
QAccessible::Focus event on the menu so NVDA/JAWS/ORCA announce it
immediately instead of waiting for the next focus change.
@CLAassistant

CLAassistant commented Aug 29, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ilya-fedin

Copy link
Copy Markdown
Contributor

This PR contents duplicate #356. Did you push to the wrong branch?

@hesam-oxe

Copy link
Copy Markdown
Author

Hi @ilya-fedin, thanks for catching this! You're absolutely right that commit 4a892e7 is duplicated from #356 — that was an oversight during branching.
However, the second commit (14396a3) which adds QAccessible::Focus to PopupMenu::showPrepared() is a distinct and necessary fix for context menu announcements. It doesn't overlap with the button name fallback in #356.
I'll rebase this branch immediately to drop the duplicate commit and keep only the popup menu change. This will make #357 a clean, single-purpose PR ready for merge. Thanks again for the sharp eye!

@ilya-fedin

Copy link
Copy Markdown
Contributor

I'll rebase this branch immediately

Did you rebase it without push? 14 hours passed but the commits didn't change

@hesam-oxe

Copy link
Copy Markdown
Author

Sorry, I forget it.

@ilya-fedin

Copy link
Copy Markdown
Contributor

Sorry, I forget it.

Did you forget again? And you have unsolved review on the other PR

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.

3 participants