-
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
Changes from all commits
9a3dd3d
0b9a7f2
d973ebb
7275ba0
11cdc69
9623af8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "prerelease", | ||
| "comment": "adding accessibility and UIA support for XAML fabric", | ||
| "packageName": "react-native-windows", | ||
| "email": "[email protected]", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -125,6 +125,27 @@ bool ContentIslandComponentView::focusable() const noexcept { | |
| return true; | ||
| } | ||
|
|
||
| facebook::react::Tag ContentIslandComponentView::hitTest( | ||
| facebook::react::Point pt, | ||
| facebook::react::Point &localPt, | ||
| bool ignorePointerEvents) const noexcept { | ||
| facebook::react::Point ptLocal{pt.x - m_layoutMetrics.frame.origin.x, pt.y - m_layoutMetrics.frame.origin.y}; | ||
|
|
||
| // 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, | ||
protikbiswas100 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| // even when the actual content (XAML buttons, etc.) is hosted in the ContentIsland. | ||
| auto props = viewProps(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer When declaring a variable in C++, almost always default to |
||
| if ((ignorePointerEvents || props->pointerEvents == facebook::react::PointerEventsMode::Auto || | ||
| 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; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| return Tag(); | ||
| } | ||
|
|
||
| return -1; | ||
| } | ||
|
|
||
| // Helper to convert a FocusNavigationDirection to a FocusNavigationReason. | ||
| winrt::Microsoft::UI::Input::FocusNavigationReason GetFocusNavigationReason( | ||
| winrt::Microsoft::ReactNative::FocusNavigationDirection direction) noexcept { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.