Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen readers fail to read some menu items in some context menus of OBS Studio #3363

Closed
k-kolev1985 opened this issue Aug 30, 2020 · 3 comments
Labels
Accessibility Improves accessibility of the program

Comments

@k-kolev1985
Copy link

Description

As the title states, screen readers like NVDA, Narrator and JAWS fail to read some menu items in some context menus of OBS Studio. The one noticed is the context menu for a source in the list of sources in the main window of OBS Studio, but I don't know if it is the only one that is problematic. And I just found out, that the problem occurs only when using the high-contrast black theme in Windows, as I do use it.

Steps to reproduce it

  1. Enable high-contrast mode in Windows 10, by doing the following:
    1.1. Open Windows Settings (Windows+I).
    1.2. Go to Ease of access -> High-contrast.
    1.3. Turn on the high-contrast mode, using the respective toggle.
    1.4. From the "High-contrast theme" combo-box, select "High-Contrast Black".
  2. Launch a screen reader like NVDA, Narrator or JAWS.
  3. Launch OBS Studio.
  4. Create a scene and add at least one source to it.
  5. Invoke the context menu for the added source and use the up/down arrow keys to navigate between its menu items.

Expected result

The screen readers should properly report all menu items (e.g. its label, its state (inactive/unavailable), if it has a submenu).

Actual result

The screen readers do not properly report some menu items (e.g. its label, its state (inactive/unavailable), if it has a submenu).

Test environment

  • Operating system: Windows 10 Pro version 2004 (build 19041.450), 64-bit, in Bulgarian with all locale settings set to "Bulgarian".
  • OBS Studio version: 25.0.8 (64 bit), portable, in english.
  • Processor: Intel Core i5-9400F at 2.90GHz.
  • RAM Memory: 16.00GB.
  • Graphics: MSI GeForce GTX-1050TI Gaming X 4G, 4096MB dedicated memory, desktop resolution set to 1920x1080.
  • Sound Card: Realtek ALC892 at Intel Cannon Point PCH.
@WizardCM WizardCM added the Accessibility Improves accessibility of the program label Oct 1, 2020
@RytoEX
Copy link
Member

RytoEX commented Sep 29, 2023

I've tried to check this in OBS Studio 29.1.3 and a recent build from git on Windows 11, and Narrator reads some of the menu items fine (label, state, and if it is collapsed/expanded). The first item in the submenu is "Add", which has a submenu. Narrator reads it as, "Add, menu item, collapsed". It correctly recognizes "Paste (Reference)" as a disabled menu item. In a quick test, it appeared that Narrator correctly reads all menu items, at least the first time I open the context menu.

However, if I opened the context menu more than once, Narrator would not read the following items in the source context menu:

  • Copy
  • Paste (Reference)
  • Paste (Duplicate)
  • Copy Filters
  • Paste Filters
  • Rename
  • Remove
  • Order
  • Transform

Curiously, in the Scenes context menu, Rename and Remove suffer the same issue:

renameScene = new QAction(QTStr("Rename"), ui->scenesDock);
renameScene->setShortcutContext(Qt::WidgetWithChildrenShortcut);
connect(renameScene, &QAction::triggered, this,
&OBSBasic::EditSceneName);
ui->scenesDock->addAction(renameScene);
renameSource = new QAction(QTStr("Rename"), ui->sourcesDock);
renameSource->setShortcutContext(Qt::WidgetWithChildrenShortcut);
connect(renameSource, &QAction::triggered, this,
&OBSBasic::EditSceneItemName);
ui->sourcesDock->addAction(renameSource);

popup.addAction(renameScene);
popup.addAction(ui->actionRemoveScene);

popup.addAction(ui->actionCopySource);
popup.addAction(ui->actionPasteRef);
popup.addAction(ui->actionPasteDup);
popup.addSeparator();
popup.addSeparator();
popup.addAction(ui->actionCopyFilters);
popup.addAction(ui->actionPasteFilters);

It seems like adding QActions that were defined elsewhere (either via a UI form or by a previous definition) to context menus causes this behavior. Incidentally, if you open a context menu, then close it, then open the Edit menu, the same behavior occurs for items that are shared between the context menu and the Edit menu. If we manually create the QActions on-demand when they are needed, these problems go away.

I have a branch where I've tackled these issues, except for the Transform sub-menu. I don't know if it's PR-ready, so I'll just link it here for now. This seems like it ought to be a bug in Qt, but we'll have to make an example and write it up to find out.
https://github.com/RytoEX/obs-studio/tree/fix-screen-reader-issues

@RytoEX
Copy link
Member

RytoEX commented Sep 29, 2023

After some searching, I think these are good QTBUG candidates for the described behavior:

Edit:
I confirmed that the behavior described in QTBUG-79858 matches the behavior observed here. QTBUG-30818 seems to offer some background information on the root cause (by way of linking to QTBUG-30792), which I have mentioned in my reply on QTBUG-79858. Hopefully that gets some attention.

@Fenrirthviti
Copy link
Member

Closing as stale. If this is still an issue please open a new issue with updated reproduction steps on the latest version of OBS.

We have made several updates to Qt since this was reported, and this may already be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility Improves accessibility of the program
Projects
None yet
Development

No branches or pull requests

4 participants