Skip to content

Commit

Permalink
Fixes a few issues with previous mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
rozele committed Mar 5, 2024
1 parent a762efe commit 47ed254
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions vnext/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ std::optional<winrt::AutomationControlType> DynamicAutomationPeer::GetAutomation
// "none": Group (based on "presentation")
// "rowgroup": Group (based on "group" mapping)
// "searchbox": Group (based on "group" mapping)
// "summary": Unknown (based on missing ARIA documentation)
// "summary": N/A (based on missing ARIA documentation)
// "switch": CheckBox (based on "checkbox" mapping)
// "table": Grid (based on "grid" mapping)
// "term": Group (based on "definition" mapping)
Expand Down Expand Up @@ -170,14 +170,12 @@ std::optional<winrt::AutomationControlType> DynamicAutomationPeer::GetAutomation
return winrt::AutomationControlType::Spinner;
case winrt::Microsoft::ReactNative::AriaRole::Status:
return winrt::AutomationControlType::StatusBar;
case winrt::Microsoft::ReactNative::AriaRole::Summary:
return winrt::AutomationControlType::Unknown;
case winrt::Microsoft::ReactNative::AriaRole::Switch:
return winrt::AutomationControlType::CheckBox;
case winrt::Microsoft::ReactNative::AriaRole::Tab:
return winrt::AutomationControlType::TabItem;
case winrt::Microsoft::ReactNative::AriaRole::Table:
return winrt::AutomationControlType::Grid;
return winrt::AutomationControlType::DataGrid;
case winrt::Microsoft::ReactNative::AriaRole::TabList:
return winrt::AutomationControlType::Tab;
case winrt::Microsoft::ReactNative::AriaRole::TabPanel:
Expand All @@ -196,9 +194,11 @@ std::optional<winrt::AutomationControlType> DynamicAutomationPeer::GetAutomation
return winrt::AutomationControlType::DataGrid;
case winrt::Microsoft::ReactNative::AriaRole::TreeItem:
return winrt::AutomationControlType::TreeItem;
case winrt::Microsoft::ReactNative::AriaRole::Summary:
case winrt::Microsoft::ReactNative::AriaRole::Unknown:
default:
return std::nullopt;
}

return std::nullopt;
}

winrt::AutomationControlType DynamicAutomationPeer::GetAutomationControlTypeFromAccessibilityRole() const {
Expand Down Expand Up @@ -497,7 +497,7 @@ winrt::Microsoft::ReactNative::AccessibilityRoles DynamicAutomationPeer::GetAcce
} catch (...) {
}

return winrt::Microsoft::ReactNative::AccessibilityRoles::Unknown;
return winrt::Microsoft::ReactNative::AccessibilityRoles::None;
}

winrt::Microsoft::ReactNative::AriaRole DynamicAutomationPeer::GetAriaRole() const {
Expand Down

0 comments on commit 47ed254

Please sign in to comment.