Skip to content

Report descriptions for .NET Framework WinForms ToolStrip menu items using UIA - #20486

Merged
SaschaCowley merged 5 commits into
nvaccess:masterfrom
cary-rowen:fix-winforms-menuitem-description
Jul 28, 2026
Merged

SaschaCowley merged 5 commits into
nvaccess:masterfrom
cary-rowen:fix-winforms-menuitem-description

Conversation

@cary-rowen

@cary-rowen cary-rowen commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

Link to issue number:

No issue. This was found while investigating #19335 and is separate from #20485.

Summary of the issue:

Classic .NET Framework Windows Forms ToolStrip menu items exposed through the native UIA provider can expose AccessibleDescription only through LegacyIAccessible. UIA FullDescription and HelpText are empty, so NVDA does not report the description.

Description of user facing changes:

NVDA now reports object descriptions for affected ToolStrip menu items.

Description of developer facing changes:

No public API changes.

Description of development approach:

Extend the existing UIA menu item description handling with a LegacyIAccessible description fallback. Standard UIA descriptions remain preferred. For affected .NET Framework WinForms ToolStripMenuItem providers, the fallback is used only when the standard description is missing or equals the object name. Descriptions equal to the name remain suppressed.

The fix is implemented directly in NVDAObjects.UIA.MenuItem. Cached UIA framework and provider metadata are used to limit the fallback to the affected .NET Framework WinForms ToolStripMenuItem providers, avoiding LegacyIAccessible queries for unrelated UIA menu items.

Testing strategy:

  • Manual testing across the .NET Framework 4.5.2, 4.7.2, 4.8 and 4.8.1 samples, plus the .NET 8 sample.
  • Unit tests cover standard UIA description precedence, LegacyIAccessible fallback, duplicate-name suppression, unsupported property values, and exclusion of WPF, modern .NET and non-ToolStrip providers.

Known issues with pull request:

None known.

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.

@cary-rowen
cary-rowen force-pushed the fix-winforms-menuitem-description branch from 39417af to d864a96 Compare July 11, 2026 21:36
@cary-rowen
cary-rowen marked this pull request as ready for review July 11, 2026 23:07
@cary-rowen
cary-rowen requested a review from a team as a code owner July 11, 2026 23:07
@cary-rowen
cary-rowen requested a review from SaschaCowley July 11, 2026 23:07
@LeonarddeR

Copy link
Copy Markdown
Collaborator

I don't think you need testing on older versions than .NET Framework 4.8. Pretty sure that it was already bundled with Windows 10. And I believe that the most recnet version of the framework is automatically targeted by applications anyway.

@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Jul 13, 2026
cary-rowen and others added 2 commits July 20, 2026 19:06
…item-description

# Conflicts:
#	source/NVDAObjects/UIA/__init__.py
#	tests/unit/test_NVDAObjects_UIA.py
#	user_docs/en/changes.md
@SaschaCowley
SaschaCowley enabled auto-merge (squash) July 27, 2026 06:13
@SaschaCowley
SaschaCowley merged commit 91329a9 into nvaccess:master Jul 28, 2026
83 of 85 checks passed
@github-actions github-actions Bot added this to the 2026.3 milestone Jul 28, 2026
@CyrilleB79 CyrilleB79 mentioned this pull request Sep 13, 2026
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants