Add ability to report the document layout in Microsoft Word#17324
Conversation
See test results for failed build of commit c51766ccdb |
|
I really don't think this should be in the title bar (it isn't visually, right?). Perhaps it could be assigned to a separate script? |
|
Hi Noelia. Thanks for addressing this issue. It will be very useful. This approach with the status bar is not the best design choice IMO. Indeed, the view ribbon allow you to select outline or draft mode but there are no corresponding buttons, at least by default, in the status bar. Also, are we sure that the status bar cannot contain any other pressed button? As suggested in #15088 (comment), I'd rather opt for the Word Object Model approach. Using the macro recorder and playing with the buttons in the view ribbon, you can find the relevant objects/properties/methods; then you can complete your information by googling the corresponding MSDN page (e.g. "VBA word view"). Also, rather than duplicating the NVDA+T script, I'd keep one single script. As for the processing done to read the status bar text (see
To be complete, the drawback of having one single script is that you cannot use a separate description in Word. |
|
Re @codeofdusk feedback:
|
|
What about including it in the |
Yes, that seems an interesting option. It would be reported when the document gets focused or when calling |
|
For me, adding this to the document name is a good option. |
|
Exploring Microsoft Word, pragmatically, I think that including this in the title may be more useful. For example, if we want to change the layout from the ribbon, we may press NVDA+tab to remember the focused button, and we can have the current layout in the title. |
|
I'll mark this as ready for review, and feedback is welcome. |
|
@nvdaes regarding the second point in #17324 (comment), namely making |
|
I have thought about a single script, but finally I decided to use a separate script. In this way:
|
@michaelDCurran and @jcsteh hold that NVDA and JAWS are very different products and take very different philosophical approaches. If a user asks for the window title, they should get the window title. |
|
I wholeheartedly agree with @codeofdusk with regard to his concern about using the title for this. |
|
@CyrilleB79 wrote:
I also tend to agree here. @nvdaes could you please address this as well? |
|
Hi reviewers, thanks for your feedback. Now we use WinwordWindowObject.view.Type to set the corresponding display string to the description. Comments are appreciated. |
|
@codeofdusk , I've handled cases where WinwordWindowObject is not available. In this case the description should be empty. |
LeonarddeR
left a comment
There was a problem hiding this comment.
I like this a lot, thanks @nvdaes
|
@codeofdusk wrote:
Probably no. If you have precise suggestions, feel free to provide them. |
SaschaCowley
left a comment
There was a problem hiding this comment.
Thanks for this, @nvdaes
Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com>
|
Thanks @SaschaCowley . Probably your suggestion is the best one, i.e., prepending the document view instead of appending it to the possible available description, so that this info is always read after the document name. I've committed your suggestion. |
|
Thanks @codeofdusk |
|
@nvdaes With current Alpha, the word document object has a description of |
|
Thanks so much @LeonarddeR . |
|
@nvdaes no need to wait for NV Access to triage this before submitting a fix. You can triage it yourself though if you like. |
Link to issue number:
Fixes #15088
Summary of the issue:
Knowing the document layout in Microsoft Word may be important, for example, to figure out why a table is not read properly when navigating with NVDA, and in other situations.
Description of user facing changes
WinwordWindowObject.view.Type is used to add the document layout to the document description. It can be announced when the document is focused, and when pressing NVDA+tab.
Description of development approach
In the WinWord app module, a script has been created, using
api.getStatusBar()to search for the status bar. If it can be found, and one of the bar status children has the PRESSED state, its name Will be added to the title, assuming that it correspond to the document layout.Testing strategy:
Tested manually, in Word documents, with the ribbon active and inactive, and with a dialog opened to check that the title without the document layout is reported when the status bar is not found.
Known issues with pull request:
None.
Code Review Checklist:
@coderabbitai summary