Skip to content

Fix TextBox UI Automation fragment root - #15058

Open
KSaiSivani wants to merge 4 commits into
dotnet:mainfrom
KSaiSivani:Fix_Issue_15043
Open

Fix TextBox UI Automation fragment root#15058
KSaiSivani wants to merge 4 commits into
dotnet:mainfrom
KSaiSivani:Fix_Issue_15043

Conversation

@KSaiSivani

@KSaiSivani KSaiSivani commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Fixes #15043

Proposed changes

  • Return the TextBoxBaseAccessibleObject as its own UI Automation fragment root.
  • Prevent IRawElementProviderFragment.get_FragmentRoot from returning S_OK with a null provider for text controls.
  • Add COM-level regression coverage before and after control handle creation.

Customer Impact

  • Prevents UI Automation clients from receiving an invalid null fragment root from TextBox, MaskedTextBox, and UpDown edit controls.
  • Prevents the application hangs reported when JAWS invokes TextPattern.RangeFromPoint.

Regression?

  • No

Risk

  • Low

Test methodology

  • Added a COM-level test verifying that get_FragmentRoot returns S_OK with a valid provider.
  • Verified the fragment root before and after control handle creation.
  • Ran all TextBoxBaseAccessibleObjectTests: 83 passed.
  • Ran the related ToolStrip fragment-root tests: 53 passed.

Test environment(s)

  • .NET SDK 11.0.100-preview.6.26359.118
Microsoft Reviewers: Open in CodeFlow

@KSaiSivani
KSaiSivani requested a review from a team as a code owner September 8, 2026 11:36
@KSaiSivani KSaiSivani changed the title Added fix for issue 15043 Fix TextBox UI Automation fragment root Sep 8, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.24166%. Comparing base (b0a7c95) to head (5a9c64c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@              Coverage Diff              @@
##                main      #15058   +/-   ##
=============================================
  Coverage   37.24166%   37.24166%           
=============================================
  Files            246         246           
  Lines           9774        9774           
  Branches        1029        1029           
=============================================
  Hits            3640        3640           
  Misses          5970        5970           
  Partials         164         164           
Flag Coverage Δ
Debug 37.24166% <ø> (ø)
production 39.36526% <ø> (ø)
test 20.64923% <ø> (ø)
unit 39.36526% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant