Skip to content
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 fixes for <View> #2612

Merged
merged 1 commit into from
Jun 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions vnext/ReactUWP/Views/FrameworkElementViewManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ void FrameworkElementViewManager::TransferProperty(XamlView oldView, XamlView ne
{
auto oldValue = oldView.ReadLocalValue(dp);
if (oldValue != nullptr)
{
newView.SetValue(dp, oldValue);
oldView.ClearValue(dp);
}
}

void FrameworkElementViewManager::TransferProperties(XamlView oldView, XamlView newView)
Expand All @@ -59,9 +62,11 @@ void FrameworkElementViewManager::TransferProperties(XamlView oldView, XamlView

// Accessibility Properties
TransferProperty(oldView, newView, winrt::AutomationProperties::NameProperty());
TransferProperty(oldView, newView, winrt::AutomationProperties::HelpTextProperty());
TransferProperty(oldView, newView, winrt::AutomationProperties::LiveSettingProperty());
auto accessibilityView = winrt::AutomationProperties::GetAccessibilityView(oldView);
winrt::AutomationProperties::SetAccessibilityView(newView, accessibilityView);
winrt::AutomationProperties::SetAccessibilityView(oldView, winrt::Peers::AccessibilityView::Raw);

auto tooltip = winrt::ToolTipService::GetToolTip(oldView);
oldView.ClearValue(winrt::ToolTipService::ToolTipProperty());
Expand Down