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.
The text was updated successfully, but these errors were encountered:
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.
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.
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.
… 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.