Skip to content

Commit

Permalink
accessibility fixes for <View> to not have duplicate accessibility na…
Browse files Browse the repository at this point in the history
…mes (#2612)
  • Loading branch information
ahimberg authored Jun 14, 2019
1 parent f22c92f commit 6b27800
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vnext/ReactUWP/Views/FrameworkElementViewManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,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 @@ -57,9 +60,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

0 comments on commit 6b27800

Please sign in to comment.