Skip to content

Implement accessibilityLevel for Fabric #14593

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 8 commits into from
Apr 24, 2025

Conversation

vineethkuttan
Copy link
Contributor

@vineethkuttan vineethkuttan commented Apr 21, 2025

Description

see #14550 for the behavior of this prop.

Type of Change

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

Why

Add Support for accessibilityLevel Prop

Resolves [#14550 , #14551]

What

  • Changes have been made to mark accessibilityLevel/ aria-level as UIA property level
  • Also , we added a provider so that if other apps requested for the UIA level property we can provide accessibilityLevel/ aria-level value
  • For testing this we have added a client which request the UIA level value from RNTesterApp

Screenshots

The below screenshots will show to difference using the Accessibility Insights for Windows tool

  • Before changes

BeforeLevel

  • After changes

AfterLevel

Testing

If you added tests that prove your changes are effective or that your feature works, add a few sentences here detailing the added test scenarios.

Tested using Playground and RNTester fabric App . Also added test cases to ensure the changes will work.

Changelog

Should this change be included in the release notes: yes

Add Support for accessibilityLevel Prop

Microsoft Reviewers: Open in CodeFlow

@anupriya13 anupriya13 requested a review from Copilot April 21, 2025 14:56
Copy link

@Copilot 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 pull request adds support for the new accessibilityLevel prop for Fabric, enabling enhanced UI automation properties for accessibility.

  • Added the new accessibilityLevel property to view props.
  • Updated construction, property setting, and UI automation providers to handle the new level.
  • Modified the RNTesterApp to include and display the new accessibilityLevel.

Reviewed Changes

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

Show a summary per file
File Description
HostPlatformViewProps.h Added the accessibilityLevel property to the view props.
HostPlatformViewProps.cpp Initialized and set the accessibilityLevel property during props construction and via the prop setter.
CompositionViewComponentView.cpp Updated UI Automation properties to include the new accessibilityLevel.
CompositionDynamicAutomationProvider.cpp Extended the property provider to return the accessibilityLevel value for UI automation.
RNTesterApp-Fabric.cpp Extended the test app to retrieve and verify the accessibilityLevel property.
Files not reviewed (1)
  • change/react-native-windows-5aa167ea-3ec8-4b11-87ed-14f728f2eec6.json: Language not supported

@chiaramooney
Copy link
Contributor

Please update the "What", "Testing", and "Changelog" sections of the PR to include relevant information, once you're ready for the PR to be reviewed.

Copy link
Contributor

@chiaramooney chiaramooney left a comment

Choose a reason for hiding this comment

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

awesome these changes are looking good. once you add a test case, I'll re-review for approval.

@vineethkuttan vineethkuttan marked this pull request as ready for review April 22, 2025 16:31
@vineethkuttan vineethkuttan requested a review from a team as a code owner April 22, 2025 16:31
@vineethkuttan vineethkuttan added enhancement Area: Accessibility Area: Fabric Support Facebook Fabric New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric Workstream: Accessibility Ensure RNW Fabric apps are properly accessible. labels Apr 23, 2025
@vineethkuttan vineethkuttan force-pushed the impAccessibilityLevel branch from 56739f6 to 9f34321 Compare April 23, 2025 17:44
Copy link
Contributor

@chiaramooney chiaramooney left a comment

Choose a reason for hiding this comment

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

Awesome! This looks good to go 👍

@vineethkuttan vineethkuttan merged commit a2a9434 into microsoft:main Apr 24, 2025
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Accessibility Area: Fabric Support Facebook Fabric enhancement New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric Workstream: Accessibility Ensure RNW Fabric apps are properly accessible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants