-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Accessibility and UIA Support for XAML Fabric implementation #15466
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
Accessibility and UIA Support for XAML Fabric implementation #15466
Conversation
|
/azp run PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
iamAbhi-916
left a comment
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.
lgtm
but one thing we are not traversing into children, thats intentional? ContentIslandComponentView this will be the boundary
vnext/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp
Show resolved
Hide resolved
|
/azp run PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Yes, this is intentional and correct. Here's why:
|
sundaramramaswamy
left a comment
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.
Approved with comments.
| // Check if the point is within the bounds of this ContentIslandComponentView. | ||
| // This ensures that hit tests correctly return this view's tag for UIA purposes, | ||
| // even when the actual content (XAML buttons, etc.) is hosted in the ContentIsland. | ||
| auto props = viewProps(); |
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.
Prefer const auto props = viewProps().
When declaring a variable in C++, almost always default to const T var = value. Drop const only if you know you're going to write to it. Why? Refer What is “const correctness”?.
| props->pointerEvents == facebook::react::PointerEventsMode::BoxOnly) && | ||
| ptLocal.x >= 0 && ptLocal.x <= m_layoutMetrics.frame.size.width && ptLocal.y >= 0 && | ||
| ptLocal.y <= m_layoutMetrics.frame.size.height) { | ||
| localPt = ptLocal; |
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.
Similarly named variables should usually be avoided. They are hard to understand for readers. Consider renaming ptLocal to something else.
Description
Accessibility and UIA Support for XAML Fabric implementation
Type of Change
Why
To ensure Accessibility props are read in Accessibility Insights.
Resolves #15325
What
Override hitTest in ContentIslandComponentView to properly handle hit testing for content inside the ChildSiteLink/ContentIsland. The method is checking if the point is within the ContentIslandComponentView's bounds
If yes, return the tag of the ContentIslandComponentView itself (or the tag that represents it properly)
This allows the accessibility tree to properly identify the container of the XAML content
Screenshots & Testing
xaml.mp4
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.
Accessibility and UIA Support for XAML Fabric implementation
Microsoft Reviewers: Open in CodeFlow