-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Labels
Area: AccessibilityArea: PerformancePR Follow-upIssue created in response to PR Feedback (labeled so we can gather telemetry on follow-up)Issue created in response to PR Feedback (labeled so we can gather telemetry on follow-up)enhancementgood first issue
Milestone
Description
Lines 34 to 44 in aa48a7a
if (strongView.try_as<winrt::Microsoft::ReactNative::Composition::implementation::WindowsTextInputComponentView>() || | |
strongView.try_as<winrt::Microsoft::ReactNative::Composition::implementation::ParagraphComponentView>()) { | |
m_textProvider = winrt::make<CompositionTextProvider>( | |
strongView.as<winrt::Microsoft::ReactNative::Composition::ComponentView>(), this) | |
.try_as<ITextProvider2>(); | |
} | |
if (strongView.try_as<winrt::Microsoft::ReactNative::Composition::implementation::ViewComponentView>()) { | |
m_annotationProvider = winrt::make<CompositionAnnotationProvider>( | |
strongView.as<winrt::Microsoft::ReactNative::Composition::ComponentView>(), this) | |
.try_as<IAnnotationProvider>(); |
If the UIA agent does not request these patterns we shouldn't create these providers. But we are trying to create these providers in the constructor itself.
Changes required:
Move the above part of code to here, where we can create the providers, only if the UIA request for it.
Lines 282 to 295 in aa48a7a
if (patternId == UIA_TextPatternId && | |
(strongView.try_as<winrt::Microsoft::ReactNative::Composition::implementation::WindowsTextInputComponentView>() || | |
strongView.try_as<winrt::Microsoft::ReactNative::Composition::implementation::ParagraphComponentView>())) { | |
m_textProvider.as<IUnknown>().copy_to(pRetVal); | |
} | |
if (patternId == UIA_TextPattern2Id && | |
strongView.try_as<winrt::Microsoft::ReactNative::Composition::implementation::WindowsTextInputComponentView>()) { | |
m_textProvider.as<IUnknown>().copy_to(pRetVal); | |
} | |
if (patternId == UIA_AnnotationPatternId && | |
strongView.try_as<winrt::Microsoft::ReactNative::Composition::implementation::ViewComponentView>() && | |
accessibilityAnnotationHasValue(props->accessibilityAnnotation)) { | |
m_annotationProvider.as<IUnknown>().copy_to(pRetVal); |
Copilot
Metadata
Metadata
Assignees
Labels
Area: AccessibilityArea: PerformancePR Follow-upIssue created in response to PR Feedback (labeled so we can gather telemetry on follow-up)Issue created in response to PR Feedback (labeled so we can gather telemetry on follow-up)enhancementgood first issue