MS Word documents: report when headings are collapsed in both speech and braille.#17499
Conversation
Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com>
|
For the feature to be complete, the following could be added to this PR:
If you prefer have this development merged as is, at least, document these missing points in "Known issues" sections and open new issues to track these missing points. Thanks. |
|
@CyrilleB79 I have addressed the docElement issue pre Windows 11, and also exposed collapsed for headings in Word with the object model. |
|
I have just tested this PR, launching the installer (nvda_snapshot_pr17499-34747,bb1e29a1.exe) and running the temporary version.
I am with:
|
|
@CyrilleB79 This is expected because Windows 10 doesn't have remote ops support in UIA core. |
|
I can't reproduce the crash.
I'll need a crash dump if you can get one. However, if this is hard to
get / or we can not trace the reason, then I'll need to remove the
object model support for reporting collapsed from this PR, as I cannot
hold back the UIA part (which works fine on win11) - it is a request
from Microsoft.
|
|
I have not been able to get a crash dump for Word. I have tried both methods described in NVDA wiki:
In both cases, I cannot get any dumpfile. I have also tried to force a dumpfile, killing winword process from task manager without success, so I am probably doing something wrong when trying to get the dumpfile. Word crashes, actually disappears, when arrowing in text heading formatted, or when trying to use expand / collapse commands. When I move the caret in normal (body) text, there is no problem. It would be nice to be able to fix this. @Adriani90 would you be able to reproduce the crash described here with object model (legacy, i.e. "Only when necessary" in advanced settings)? But if it is not possible to fix the issue with Word Object model, nor reproducible on your side, I understand that you may want to merge the UIA part, what is already an improvement. |
|
@michaelDCurran, I have found why it crashes on my end and tested that it does not crash anymore with the fix, running from source. Strange that you have not experimented this crash; maybe you were not really testing Word object model due to 13704? |
|
I was definitely testing with the object model. Perhaps you are using
32 bit MS Word and I am using 64 bit, or you have tighter execution /
memory policies set in Windows?
Either way, I'm glad you found the cause.
|
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
Yes, I am running Office 2016 32 bits. |
Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com> Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
SaschaCowley
left a comment
There was a problem hiding this comment.
Could you please update the copyright headers of the files modified in this PR?
…is now reported (#17545) Related to #17499, but independent of it. Summary of the issue: In MS Word, control+alt+plus and control+alt+- allow to expand and collapse the content below a heading. NVDA does not report the result of this action. Description of user facing changes: NVDA now reports the result of the Word commands to expand and collapse headings. This command does not exist in Draft mode, so nothing is reported when in this mode. The command also does not report anything in Outline mode (limitation of this PR). Description of development approach: Use Word object model (if available) as done for many Word gestures, no matter if UIA is enabled or not Testing strategy: Tested with and without UIA. Known issues with pull request:: This PR does not cover outline mode. The collapse / extend commands still don't report anything in Outline mode; see related issue #17645.
…is now reported (nvaccess#17545) Related to nvaccess#17499, but independent of it. Summary of the issue: In MS Word, control+alt+plus and control+alt+- allow to expand and collapse the content below a heading. NVDA does not report the result of this action. Description of user facing changes: NVDA now reports the result of the Word commands to expand and collapse headings. This command does not exist in Draft mode, so nothing is reported when in this mode. The command also does not report anything in Outline mode (limitation of this PR). Description of development approach: Use Word object model (if available) as done for many Word gestures, no matter if UIA is enabled or not Testing strategy: Tested with and without UIA. Known issues with pull request:: This PR does not cover outline mode. The collapse / extend commands still don't report anything in Outline mode; see related issue nvaccess#17645.
|
This seems to fail in outline view in MS Word, at least in my case it delivers wrong information.
Actual: Headings are always announced as "colapsed" |
|
@Adriani90 - please open a new issue so that this is tracked. comments on closed PRs are easily lost. |
… version 16.0.18226 or higher. (#18280) Fixes #18279 Summary of the issue: PR #17499 added support for reporting if a heading is collapsed in MS word. However, this crashes some versions of MS Word before this feature was supported. For example, MS word version16.0.17932.20396 supports custom attribute values, but crashes if given this specific expandCollapseState constant. NVDA should limit fetching this data to when it was officially supported in MS Word. Description of user facing changes: Microsoft Word 2024 will no longer crash when NVDA tries to fetch the collapsed state of headings. Description of developer facing changes: Description of development approach: Limit fetching of expandcollapseState to MS Word 16.0.18226 and higher.
Link to issue number:
None.
Summary of the issue:
In Microsoft Word, it is possible to collapse a heading, so that all the paragraphs directly following the heading are hidden. As of MS Word 16.0.18226, a new UIA text range custom attribute was added, to convey the expand collapse state of headings. NVDA should report when a heading is collapsed based on this value.
Description of user facing changes
In Microsoft Word, If a heading is collapsed, NVDA will now report this in speech and braille.
Description of development approach
Testing strategy:
Tested with MS Word 16.0.18331.
Known issues with pull request:
None known.
This implementation only reports when a heading is collapsed, and not explicitly when expanded. However, as expanded headings will far outweigh collapsed, I think it would be way too noisy to report expanded, when that is going to be the norm.
Code Review Checklist:
@coderabbitai summary