Skip to content

Add Support for accessibilityLiveRegion Prop #13596

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

Merged
merged 9 commits into from
Aug 28, 2024

Conversation

chiaramooney
Copy link
Contributor

@chiaramooney chiaramooney commented Aug 21, 2024

Description

Type of Change

  • New feature (non-breaking change which adds functionality)

Why

Add Support for accessibilityLiveRegion Prop

Resolves #13031
Resolves #13030
Resolves #13029
Resolves #13028
Resolves #13027
Resolves #13026
Resolves #13025
Resolves #13024
Resolves #12515

What

  • 3 values for accessibilityLiveRegion are supported none, polite, and assertive.
  • See Add support for accessibilityLiveRegion / aria-live #12515 for behavior of prop.
  • Note: Current behavior leaves prop value as "none" and fires no error when the user submits a prop value that is not one of the accepted values of the prop.

Changelog

Should this change be included in the release notes: Yes

Add Support for accessibilityLiveRegion Prop

Microsoft Reviewers: Open in CodeFlow

@chiaramooney chiaramooney requested a review from a team as a code owner August 21, 2024 00:10
Comment on lines 167 to 168
if (liveRegion == "none"){
return LiveSetting::Off;
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems redundant to have this block if the default return value is LiveSetting::Off.

}else if (liveRegion == "assertive"){
return LiveSetting::Assertive;
}
//assert(false); // TO-DO: swap to a RedBox error
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, what is a RedBox error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When you launch a React Native app, it is a kind of error that is shown at runtime in the app window. It helps alert the developer that something in the JavaScript is wrong.

@microsoft-github-policy-service microsoft-github-policy-service bot added Area: Accessibility Area: ActivityIndicator Area: Component Views Area: Fabric Support Facebook Fabric Area: Image Area: Modal Area: RefreshControl Area: ScrollView Area: Switch Area: TextInput Area: View Area: View Props https://reactnative.dev/docs/view#props Parity: Fabric vs. Paper RNW Fabric does not look or behave like RNW Paper New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric labels Aug 26, 2024
@chiaramooney chiaramooney merged commit 3658abf into microsoft:main Aug 28, 2024
55 checks passed
@chiaramooney chiaramooney deleted the cm-live-setting branch August 28, 2024 00:04
acoates-ms pushed a commit to acoates-ms/react-native-windows that referenced this pull request Aug 30, 2024
* Add Tests

* Change files

* Fix Error

* Change files

* Format

* Update Snapshots

* Default to None
acoates-ms pushed a commit to acoates-ms/react-native-windows that referenced this pull request Aug 30, 2024
* Add Tests

* Change files

* Fix Error

* Change files

* Format

* Update Snapshots

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