-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Basic implementation of UIA navigation functions #11412
Conversation
vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp
Outdated
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp
Outdated
Show resolved
Hide resolved
long GetControlType(const std::string &role) noexcept { | ||
if (role == "adjustable") { | ||
return UIA_SliderControlTypeId; | ||
} else if (role == "alert" || role == "group" || role == "search" || role == "timer" || role.empty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"alert" returned Text before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I mentioned in the description that some of the ways Paper is mapping roles to UIA control types doesn't agree with the ARIA Core AAM. Given Meta seems to be moving more toward ARIA standards, I thought I'd fix this now, but I suppose we can discuss this more and I'll leave the original mapping in place for now.
Description
Adds a AutomationProvider for non-Root elements and enables the UIA client to navigate among our Fabric-based Component's UIA providers. This adds a very basic implementation for a few RN a11y props (accessibilityRole, name, and testId) to make the tree a little more interesting and unblock basic automated-test scenarios; however, since that was not the focus of this PR, work remains to be done here (e.g. UIA property change notifications, separating Control/Content/Raw trees). PR sent out now to keep the change small since there's a lot of work to be done, we'll keep iterating :)
Type of Change
Why
Right now, the only accessible element in the UIA tree is the RootView. This makes the rest of the tree accessible for AT users (albeit with very limited functionality).
What
Screenshots
Testing
Manually verified a few of the JS samples have reasonable a11y trees in Accessibility Insights
Microsoft Reviewers: Open in CodeFlow