File tree Expand file tree Collapse file tree 4 files changed +9
-0
lines changed Expand file tree Collapse file tree 4 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ const styles = StyleSheet.create({
2020
2121export default function ProgressViewWindows ( props : WindowsNativeProps ) {
2222 const nativeProps = {
23+ accessibilityLabel : props . accessibilityLabel ,
2324 testID : props . testID ,
2425 progressViewStyle : props . progressViewStyle ,
2526 progress : props . progress ,
Original file line number Diff line number Diff line change @@ -31,5 +31,7 @@ export type ProgressViewProps = ViewProps & {
3131 * A stretchable image to display behind the progress bar.
3232 */
3333 trackImage ?: ImageSourcePropType ,
34+
35+ accessibilityLabel ?: String ,
3436} ;
3537export class ProgressView extends React . Component < ProgressViewProps > { }
Original file line number Diff line number Diff line change @@ -51,6 +51,11 @@ namespace winrt::progress_view::implementation {
5151 else if (propertyName == " isIndeterminate" ) {
5252 this ->IsIndeterminate (propertyValue.AsBoolean ());
5353 }
54+ else if (propertyName == " accessibilityLabel" ) {
55+ if (!propertyValue.IsNull ()) {
56+ this ->Name (to_hstring (propertyValue.AsString ()));
57+ }
58+ }
5459 else if (propertyName == " progressImage" ) {
5560 if (!propertyValue.IsNull ()) {
5661 auto imgUriString = propertyValue.AsObject ()[" uri" ].AsString ();
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ namespace winrt::progress_view::implementation {
3737 // IViewManagerWithNativeProperties
3838 IMapView<hstring, ViewManagerPropertyType> ProgressViewViewManager::NativeProps () noexcept {
3939 auto nativeProps = winrt::single_threaded_map<hstring, ViewManagerPropertyType>();
40+ nativeProps.Insert (L" accessibilityLabel" , ViewManagerPropertyType::String);
4041 nativeProps.Insert (L" progress" , ViewManagerPropertyType::Number);
4142 nativeProps.Insert (L" progressTintColor" , ViewManagerPropertyType::Color);
4243 nativeProps.Insert (L" trackTintColor" , ViewManagerPropertyType::Color);
You can’t perform that action at this time.
0 commit comments