Skip to content

MS Word with UIA: only fetch expandCollapseState for headings on Word version 16.0.18226 or higher.#18280

Merged
seanbudd merged 4 commits into
rcfrom
i18279
Jun 19, 2025
Merged

MS Word with UIA: only fetch expandCollapseState for headings on Word version 16.0.18226 or higher.#18280
seanbudd merged 4 commits into
rcfrom
i18279

Conversation

@michaelDCurran

@michaelDCurran michaelDCurran commented Jun 18, 2025

Copy link
Copy Markdown
Member

Link to issue number:

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.

Testing strategy:

  • Open a document in MS Word version 16.0.19200, read a collapsed heading ensuring that NDA reports it as collapsed.
  • Open a document in MicrosoftWord version 16.0.17932.20396. Confirm that MS Word does not crash, and that collapsed state of headings is not reported.

Known issues with pull request:

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@coderabbitai summary

Comment thread source/NVDAObjects/UIA/wordDocument.py Outdated
@CyrilleB79

Copy link
Copy Markdown
Contributor

Change log is missing. Thanks.

michaelDCurran and others added 2 commits June 18, 2025 19:20
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
Comment thread user_docs/en/changes.md Outdated
@seanbudd seanbudd added this to the 2025.1.2 milestone Jun 18, 2025
@seanbudd seanbudd merged commit 50fde45 into rc Jun 19, 2025
5 checks passed
@seanbudd seanbudd deleted the i18279 branch June 19, 2025 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants