diff --git a/js/ProgressView.windows.js b/js/ProgressView.windows.js index 629e4b43b..6bd815804 100644 --- a/js/ProgressView.windows.js +++ b/js/ProgressView.windows.js @@ -20,6 +20,7 @@ const styles = StyleSheet.create({ export default function ProgressViewWindows(props: WindowsNativeProps) { const nativeProps = { + accessibilityLabel: props.accessibilityLabel, testID: props.testID, progressViewStyle: props.progressViewStyle, progress: props.progress, diff --git a/js/index.d.ts b/js/index.d.ts index 867dbd7b5..742ffd255 100644 --- a/js/index.d.ts +++ b/js/index.d.ts @@ -31,5 +31,7 @@ export type ProgressViewProps = ViewProps & { * A stretchable image to display behind the progress bar. */ trackImage?: ImageSourcePropType, + + accessibilityLabel?: String, }; export class ProgressView extends React.Component {} diff --git a/windows/progress-view/ProgressViewView.cpp b/windows/progress-view/ProgressViewView.cpp index c4850d212..006a1af90 100644 --- a/windows/progress-view/ProgressViewView.cpp +++ b/windows/progress-view/ProgressViewView.cpp @@ -51,6 +51,11 @@ namespace winrt::progress_view::implementation { else if (propertyName == "isIndeterminate") { this->IsIndeterminate(propertyValue.AsBoolean()); } + else if (propertyName == "accessibilityLabel") { + if (!propertyValue.IsNull()) { + this->Name(to_hstring(propertyValue.AsString())); + } + } else if (propertyName == "progressImage") { if (!propertyValue.IsNull()) { auto imgUriString = propertyValue.AsObject()["uri"].AsString(); diff --git a/windows/progress-view/ProgressViewViewManager.cpp b/windows/progress-view/ProgressViewViewManager.cpp index b0c1af047..88fa47b9d 100644 --- a/windows/progress-view/ProgressViewViewManager.cpp +++ b/windows/progress-view/ProgressViewViewManager.cpp @@ -37,6 +37,7 @@ namespace winrt::progress_view::implementation { // IViewManagerWithNativeProperties IMapView ProgressViewViewManager::NativeProps() noexcept { auto nativeProps = winrt::single_threaded_map(); + nativeProps.Insert(L"accessibilityLabel", ViewManagerPropertyType::String); nativeProps.Insert(L"progress", ViewManagerPropertyType::Number); nativeProps.Insert(L"progressTintColor", ViewManagerPropertyType::Color); nativeProps.Insert(L"trackTintColor", ViewManagerPropertyType::Color);