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

Enhancement: In MS Office, always announce ribbon section when using control+arrows #7067

Qchristensen opened this issue Apr 12, 2017 · 5 comments


Copy link

Qchristensen commented Apr 12, 2017

In Microsoft Office, after pressing, for instance, alt+h to move to the home ribbon, when you press control+right arrow to move between sections on the current ribbon, NVDA announces the new section only if the first control is a button. If the first control is an edit box (eg the font name edit in the font section of Word's home ribbon), then the ribbon section is not announced.

When you press control+right arrow to move to the next section, NVDA first announces "Home grouping" before (in this case) "Paragraph grouping" which is likely relevant.

Expected behaviour: when moving to a new ribbon section, NVDA should announce it before announcing the current control.

Copy link

jcsteh commented Apr 12, 2017



  • The grouping is not an ancestor of the text box as far as NVDA is concerned.
  • I checked with Narrator's "advanced navigation" (which allows you to access ancestors) and the grouping does appear there.
  • These text boxes seem to be RichEdit controls and we don't use UIA for those.
  • I checked accParent and it does get to the font "toolbar" (since it's exposed as a toolbar, not a grouping, for MSAA).
  • Our IAccessible code is skipping this accParent, probably because of the hack we have to deal with implementations which skip the window root accessible.
  • This isn't that much use to us anyway, though, because we really want the UIA object (and I don't think we can get it from this IAccessible).
  • I think the only feasible solution here is to use UIA for this RichEdit control. However, that could be problematic because we're not sure of the state of the RichEdit proxy in various versions of Windows. I'm pretty sure there's no RichEdit proxy in Windows 7 and we think there might be some problems with that proxy in Windows 8.

@jcsteh jcsteh added the p3 label Apr 12, 2017
Copy link

Adriani90 commented Apr 12, 2019

@Qchristensen I am not able to reproduce this issue in NVDA 2019.1 and MS Office 2016 / 365 as well as Office 2010. Are you still seeing this issue on your side?

Copy link

lukaszgo1 commented Apr 13, 2019

I can still reproduce it on Windows 7 with Office 2010 32-bit using latest Alpha of NVDA.

Copy link
Member Author

Qchristensen commented May 20, 2019

In Windows 10 (May 2019 update 18362.1 ) with NVDA 2019.1 in Word 365 v 16.0.11601.20184, I get the correct announcement when moving to the font grouping (which starts with an edit box).

Interestingly now, however, if I press CONTROL+RIGHT ARROW to move to the font grouping, it reads all the correct information, including font name etc, however, if I press CONTROL+RIGHT ARROW again, it reads "Calibri, Paragraph grouping..." - where Calibri is the name of the font in the font edit I've just left.

Copy link

lukaszgo1 commented May 1, 2020

I've fixed this for Office 2013 and older in #10981. To do that it has been necessary to use IAccessible for these controls and then change their role to grouping when accValue is "Group" (testing with different Office languages shows that it is not localized). For 2016 and 365 this still does not work. While the AccValue still can be used to change role when ribbons are collapsed and they are accessed via IAccessible focus changes are not reported. I've added additional logging to eventHandler.shouldAcceptEvent and gainFocus events are emitted by these controls and shouldAcceptEvent returns True, however they are ignored at some later point. The event handling in IAccessible is quite complex so I am not sure how much further I would be able to investigate. @feerrenrut Given your recent work on event handling have you considered writing a description of the process on the repo's Wiki - this certainly would be helpful for beginner developers.

feerrenrut pushed a commit that referenced this issue May 1, 2020
… Office 2013 and prior (PR #10981)

Now in Office 2013 and older:

- Ribbons are announced when focus moves to them for the first time.  (#4207)
- Context menu items are once again reported properly. (#9252)
- Ribbon sections are consistently announced when navigating with Control+arrows. (#7067)

IAccessible is used for these controls for Office <=2013.
To do that it has been necessary to workaround some IAccessible specific issues:
- Status bar is not exposed as such #4257
- Ribbon sections do not have proper role.

In both cases AccValue contains non localized description of the control which made it possible to workaround them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

4 participants