Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add switch "NotifyUIAProviderTheText" to control screen Reader to announce the content of RichTextBox #12986

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LeafShi1
Copy link
Member

@LeafShi1 LeafShi1 commented Feb 20, 2025

Fixes #12772

Proposed changes

  • Add switch System.Windows.Forms.RichTextBox.NotifyUIAProviderTheText to control screen Reader to announce the content of RichTextBox

Customer Impact

  • RichTextBox sends the currently focused line instead of its entire contents as an accessibility event on focus.

Regression?

  • Yes

Risk

  • Minimal

Screenshots

Before

When NVDA get focus, the entire content gets read, not just the currently focused line
image

After

When the switch is on, Narrator, JAWS and NVDA will read the full contents of the RichTextBox.
When the switch is off, JAWS and NVDA will only read the contents of the currently focused line, while Narrator will not read the contents of the RichTextBox.
image

Test methodology

  • Manually

Test environment(s)

  • .net 10.0.0-preview.2.25112.7
Microsoft Reviewers: Open in CodeFlow

@LeafShi1 LeafShi1 requested a review from a team as a code owner February 20, 2025 06:38
@LeafShi1 LeafShi1 requested a review from Copilot February 20, 2025 06:40

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Copy link

codecov bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.93695%. Comparing base (4de9ca9) to head (0902800).
Report is 36 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #12986         +/-   ##
===================================================
- Coverage   96.95378%   96.93695%   -0.01683%     
===================================================
  Files           1218        1220          +2     
  Lines         356671      356867        +196     
  Branches        5524        5529          +5     
===================================================
+ Hits          345806      345936        +130     
- Misses         10026       10090         +64     
- Partials         839         841          +2     
Flag Coverage Δ
Debug 96.93695% <100.00000%> (-0.01683%) ⬇️
test 96.93695% <100.00000%> (-0.01683%) ⬇️

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

@ricardobossan ricardobossan added the waiting-review This item is waiting on review by one or more members of team label Feb 20, 2025
Copy link
Member

@ricardobossan ricardobossan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All LGTM!

@LeafShi1 LeafShi1 force-pushed the Issue_12772_Update_RichTextBox_announce_contents branch from ca41d36 to 0902800 Compare February 21, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-review This item is waiting on review by one or more members of team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RichTextBox always sends its entire contents as an accessibility event on focus.
2 participants