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

Menuitemradio or menuitemcheckbox is not announced, even though announcement is shown in NVDA Speech Viewer #14550

Closed
markmagennis opened this issue Jan 16, 2023 · 2 comments · Fixed by #16551
Assignees
Labels
app/firefox ARIA blocked/needs-external-fix needs-technical-investigation A technical investigation is required to progress the issue. p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.

Comments

@markmagennis
Copy link

Steps to reproduce:

  1. Open NVDA Speech Viewer.
  2. Go to the ARIA Authoring Practices menubar example https://www.w3.org/WAI/ARIA/apg/example-index/menubar/menubar-editor.html
  3. Tab down to the Example and open the Font menu.

Actual behavior:

Speech Viewer shows:
"Sans-serif radio menu item checked 1 of 4
Font menu"

NVDA reads:
"Font menu"

Expected behavior:

NVDA should speak what is in the Speech Viewer, so it should say "Sans-serif radio menu item checked 1 of 4" before saying "Font menu".

System configuration

NVDA version:

2022.4

Windows version:

Win 11

Name and version of other software in use when reproducing the issue:

Firefox 108.0.2

This behaviour occurs if the first menu item is a menuitemradio or menuitemcheckbox. The same behaviour has been observed in my company's product but I cannot give access, hence showing that it occurs in the ARIA Practices example.

@seanbudd seanbudd added ARIA p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority needs-technical-investigation A technical investigation is required to progress the issue. triaged Has been triaged, issue is waiting for implementation. labels Jan 17, 2023
@Adriani90
Copy link
Collaborator

This is reproducible only in Firefox so far, and it is fixed when cancellable speech on expired focus event is disabled in advanced settings of NVDA.
However, disabling cancellable speech on expired focus events introduces other issues such as high verbosity on mouse movements, reporting of previously focused list items when focus event expired etc. So disabling this setting is not a suitable workaround.

Note: this issue is relevant only in focus mode. In browse mode the focus is not redirected to the first menu item, and is standard behavior in every browser as far as I can see.

cc: @jcsteh do you have any idea why the cancellable speech feature behaves differently in Firefox in this case?

@jcsteh
Copy link
Contributor

jcsteh commented Oct 31, 2023

I think Firefox is firing the event for the menu opening after the event for the menu item getting focus. We should probably fix that. There's https://bugzilla.mozilla.org/show_bug.cgi?id=731091, though that's not for ARIA menu items so we may end up needing a separate bug.

That said, NVDA could work around this like it already has for role="menuitem" with a tiny tweak to eventHandler.FocusLossCancellableSpeechCommand.isMenuItemOfCurrentFocus. Currently, this only checks for menu items. It should check for radio and check menu items as well.

@SaschaCowley SaschaCowley self-assigned this May 15, 2024
seanbudd pushed a commit that referenced this issue May 23, 2024
Fixes #14550

Summary of the issue:
NVDA does not correctly announce checkbox or radio button menuitems when first entering submenues in Firefox or Chrome, as its announcement of the menuitem is disrupted by its announcement of the containing menu or grouping.

Description of user facing changes
Checkbox and radio button menuitems are correctly read in Chrome and Firefox.

Description of development approach
Updated FocusLossCancellableSpeechCommand.isMenuItemOfCurrentFocus to:

Detect objects with role IA2_ROLE_CHECK_MENU_ITEM or IA2.IA2_ROLE_RADIO_MENU_ITEM as well as oleacc.ROLE_SYSTEM_MENUITEM; and
Traverse up the old focus's ancestors to find the ancestor menu, instead of assuming that it will be its parent, to support grouped menuitems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app/firefox ARIA blocked/needs-external-fix needs-technical-investigation A technical investigation is required to progress the issue. p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants