Skip to content

Conversation

@anupriya13
Copy link
Contributor

@anupriya13 anupriya13 commented Jul 14, 2025

Description

Why

Repro-Steps:
Launch the React Native Gallery- Experimental app.
Navigate to the 'Expand menu' button and invoke it.
Navigate to 'Home' button and invoke it.
Navigate to 'Clipboard' button and invoke it.
Observe the announcement and behavior.
Actual Result:
On invoking the 'Copy to clipboard' button, Narrator is not announcing any success message.
Note: Visually also no changes appeared on invoking 'Copy to clipboard' button.

Expected Result:
On invoking the 'Copy to clipboard' button, visually the 'Copied' message should appear and Narrator should announce as "Copied to clipboard".

User impact:

Users with visual impairment who rely on screen reader might get confused if narrator does not announce any success message.

MAS Reference: MAS 4.1.3 – Status Messages

Trap ID: 1.9 - Feedback Failure
Resolves #586

What

Implementation of AccessibilityInfo.announceForAccessibility for Fabric is not done yet.

Doing a workaround and using accessibilityValue for now as the functionality is same.
Related PR: microsoft/react-native-windows#14858
Related Issue: #605

Screenshots

image
Microsoft Reviewers: Open in CodeFlow

@anupriya13
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anupriya13 anupriya13 requested a review from Copilot July 14, 2025 08:08
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 addresses a screen reader bug by replacing direct announcements with updates to accessibilityValue, enabling Fabric support for announcing clipboard copy/paste status.

  • Removes AccessibilityInfo import and related calls
  • Introduces two state variables for accessibilityValue on the Copy and Paste buttons
  • Updates onPress and onAccessibilityTap handlers to reset and set the value for announcements
Comments suppressed due to low confidence (2)

NewArch/src/examples/ClipboardExamplePage.tsx:13

  • [nitpick] The state names accessibilityValueCopy and accessibilityValuePaste are verbose. Consider renaming them to something like copyStatusMessage and pasteStatusMessage to clarify their intent.
  const [accessibilityValueCopy, setAccessibilityValueCopy] = useState('');

NewArch/src/examples/ClipboardExamplePage.tsx:47

  • There are no tests verifying that accessibilityValue updates trigger announcements. Consider adding a test to assert that the success message is set on the button after press.
          <Button

@anupriya13 anupriya13 requested a review from vineethkuttan July 14, 2025 08:09
@anupriya13 anupriya13 marked this pull request as ready for review July 14, 2025 09:33
@chiaramooney
Copy link
Contributor

This change seems okay for now, while we are working on getting a working AccessibilityInfo implementation. Can you file an issue in the repo noting that we should remove these changes once AccessibilityInfo is working? Can you also add a comment to each code block in this PR with // Issue #: Workaround; Remove once AccessibilityInfo module is implemented?

This way we can keep track of this change as a workaround.

@anupriya13
Copy link
Contributor Author

This change seems okay for now, while we are working on getting a working AccessibilityInfo implementation. Can you file an issue in the repo noting that we should remove these changes once AccessibilityInfo is working? Can you also add a comment to each code block in this PR with // Issue #: Workaround; Remove once AccessibilityInfo module is implemented?

This way we can keep track of this change as a workaround.

Created issue #622 and added comment

@anupriya13
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@iamAbhi-916 iamAbhi-916 left a comment

Choose a reason for hiding this comment

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

once announceForAccessibility is added to RNW then this workaround can be removed , ig we can do it using accessibilityLabel which is supported by rnw now for narrator annoucement and hook for now this looks good .

@vineethkuttan
Copy link
Contributor

LGTM!

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.

[React Native New Architecture]: Narrator is not announcing any success message on invoking 'Copy to clipboard' button.

4 participants