Skip to content

Conversation

@vineethkuttan
Copy link
Contributor

@vineethkuttan vineethkuttan commented Aug 27, 2025

Description

Fix for Text and TextInput focus issue with screen readers

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Why

What is the motivation for this change? Add a few sentences describing the context and overall goals of the pull request's commits.
This changes will make screen readers to access Text and Text Input Component.
Resolves [#14499 ,#15045,microsoft/react-native-gallery/issues/589]

What

What changes were made to the codebase to solve the bug, add the functionality, etc. that you specified above.
Implemented to methods for TextRangeProvider and some bug fix.

Screenshots

Before:

UnableToMove.mp4

After:

GotFoxus.mp4

Testing

Tested in Playground

Changelog

Should this change be included in the release notes: yes

Add a brief summary of the change to use in the release notes for the next release.
Fix for Text and TextInput focus issue with screen readers in Fabric

Microsoft Reviewers: Open in CodeFlow

@vineethkuttan vineethkuttan changed the title [DON'T REVIEW] Fixing Narrator focus for TextInput [Fabric] Fix for Text and TextInput focus issue with screen readers Aug 29, 2025
@vineethkuttan vineethkuttan marked this pull request as ready for review August 29, 2025 06:35
@vineethkuttan vineethkuttan requested a review from a team as a code owner August 29, 2025 06:35
@HariniMalothu17 HariniMalothu17 self-requested a review August 29, 2025 06:46
@anupriya13 anupriya13 requested a review from Copilot August 29, 2025 06:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes accessibility issues with Text and TextInput components in React Native Windows Fabric architecture, specifically addressing focus problems when using screen readers. The changes implement proper UI Automation (UIA) text pattern provider methods that were previously stubbed out as no-ops.

Key changes:

  • Implements proper Clone and Compare methods for TextRangeProvider to support screen reader navigation
  • Fixes return value handling in GetAttributeValue method for text styling attributes
  • Adds null pointer validation across multiple methods

Reviewed Changes

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

File Description
CompositionTextRangeProvider.cpp Implements UIA TextRangeProvider methods for screen reader compatibility and fixes attribute value return handling
change/react-native-windows-4046d3e2-cc00-459e-b62d-4489b3ef14d1.json Adds changelog entry for the accessibility fix

@vineethkuttan vineethkuttan merged commit 3e8db0c into microsoft:main Sep 1, 2025
58 checks passed
vineethkuttan added a commit that referenced this pull request Sep 2, 2025
…15088)

* Few more implementation of TextRange Provider

* Yarn change

* Update Change file
vineethkuttan added a commit that referenced this pull request Sep 2, 2025
…#15105)

* [Fabric] Implement announceForAccessibility in AccessibilityInfo Module (#14995)

* Implementation of announce for accessibility for fabric

* Build fix

* Removed Debug Message

* Yarn Change

* Copilot Suggestions

* Review Changes

* Storing the weak_ref island in property to avoid circular ref

* Adding deleted Change Files

* [Fabric] Raising UIA Event if Toggle State Changes in Switch Component (#15023)

* Update Toggle State to Narrator

* Yarn Change

* Review Changes

* Review Changes 2.0

* [Fabric] Fix for Text and TextInput focus issue with screen readers (#15088)

* Few more implementation of TextRange Provider

* Yarn change

* Update Change file
protikbiswas100 pushed a commit to protikbiswas100/react-native-windows that referenced this pull request Sep 3, 2025
…icrosoft#15088)

* Few more implementation of TextRange Provider

* Yarn change

* Update Change file
@vineethkuttan vineethkuttan deleted the fixITextRangeProvider branch September 8, 2025 06:05
acoates-ms pushed a commit to acoates-ms/react-native-windows that referenced this pull request Sep 11, 2025
…icrosoft#15088)

* Few more implementation of TextRange Provider

* Yarn change

* Update Change file
acoates-ms added a commit that referenced this pull request Sep 19, 2025
* Pointer events (#14713)

* PointerEvent fixes

* Change files

* format

* [Fabric] Implement SpellCheck and AutoCorrect for TextInput (#14509)

* Fabric : Added support for selectionColor in TextInput component  (#14743)

* Added support for selectionColor for textInput

* yarn fix and format

* Change files

* Implement adjustsFontSizeToFit property for Text in Fabric (#14519)

* Implementation of adjustFontSizeToFit

* Final Changes using TextLayout

* Lint Issue Fixes

* Change files

* prop change detection added

* review Changes and E2E test cases added

* Lint and Format Changes added

* Test Cases Fix added

* Update SnapShot

* Removed the additional Check for resizing Font

* Updated SnapShot

* Review Changes

* Lint and Format Changes

---------

Co-authored-by: Vineeth K <kvineeth@microsoft.com>

* Text : Added EllipsizeMode for tail and clip alignment  (#14660)

* updated ellipsis to respect tail and clip behaviour , for head , middle follow defaulty tail behaviour

* patched updateTextAlignment method

* Change files

* pathced branch , lint fix , lint format

* updated snapshots

* added layout changes to TextLayoutManager

* lint fix and format

* updated snapshots

* updated snapshot Pressable component

* updated to remove extra text_layout null check

* removed comments

* format and lint:fix

* [Fabric] Implement onContentSizeChange in TextInput (#14785)

* Fix : adjustsFontSizeToFit just redrawing won't recalculate the layout (#14813)

* updated adjustsFontSizeToFit textlayout to nullptr

* Change files

* [Fabric] Implement autoFocus property for TextInput for fabric  (#14816)

* Added fix for AutoFocus

* Change files

---------

Co-authored-by: Harini Malothu <hmalothu@microsoft.com>

* [Fabric] Implementation of accessibilityDescription (#14818)

* Initial Commit for accessibilityDescription

* Change files

* Format Changes

* Updating Snapshot

* [Fabric] Implement maxFontSizeMultiplier in Text Input (#14639)

* [Fabric] Fix for updating accessibility value in UIA (#14858)

* Changes for updating accessibilityValue prop

* Change files

* TextInput should capture mouse on mouse down (#14983)

* TextInput should capture mouse on mouse down

* Change files

* format

* [Fabric] Raising UIA Event if Toggle State Changes in Switch Component (#15023)

* Update Toggle State to Narrator

* Yarn Change

* Review Changes

* Review Changes 2.0

* [Fabric] Add Support for ITextProvider, ITextProvider2, and ITextRangeProvider (#14332)

* Partial Implementation

* Add More Implementation

* More Implementation

* More Implementation

* Add Support for Bounding Rectangles

* Complete Initial Implementation

* Change files

* Code Cleanup

* Code Cleanup

* Update Snapshots + Code Cleanup

* Update Snapshots

* Address Feedback

* Address Feedback

* Update Snapshots

* Fix Tests

---------

Co-authored-by: Jon Thysell <jthysell@microsoft.com>

* [Fabric] Fix for Text and TextInput focus issue with screen readers (#15088)

* Few more implementation of TextRange Provider

* Yarn change

* Update Change file

* Screen reader fails to announce the expand/collapse state of the navigation button (#15106)

* adding UIA event handler changes for navigator

* Change files

* adding ViewComponent chnages for accessibility

* removing unnecessary change file

* Remove vnext/fmt/packages.lock.json

---------

Co-authored-by: Protik Biswas <protikbiswas100@microsoft.com>

* fix

* fix

* Upgrade dotnet version

* Change files

* bump sdk

* bump node

* fix

* fix

* Change files

* fix

* fix

* test

* fix

* fix

* update snapshots

* snapshot

* snapshot

* measureLines

* fix

* snapshot

---------

Co-authored-by: Anupriya Verma <54227869+anupriya13@users.noreply.github.com>
Co-authored-by: Abhijeet Jha <74712637+iamAbhi-916@users.noreply.github.com>
Co-authored-by: Vineeth <66076509+vineethkuttan@users.noreply.github.com>
Co-authored-by: Vineeth K <kvineeth@microsoft.com>
Co-authored-by: Harini Malothu <harinimalothu17@gmail.com>
Co-authored-by: Harini Malothu <hmalothu@microsoft.com>
Co-authored-by: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com>
Co-authored-by: Jon Thysell <jthysell@microsoft.com>
Co-authored-by: Protik Biswas <219775028+protikbiswas100@users.noreply.github.com>
Co-authored-by: Protik Biswas <protikbiswas100@microsoft.com>
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.

5 participants