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({
20
20
21
21
export default function ProgressViewWindows ( props : WindowsNativeProps ) {
22
22
const nativeProps = {
23
+ accessibilityLabel : props . accessibilityLabel ,
23
24
testID : props . testID ,
24
25
progressViewStyle : props . progressViewStyle ,
25
26
progress : props . progress ,
Original file line number Diff line number Diff line change @@ -31,5 +31,7 @@ export type ProgressViewProps = ViewProps & {
31
31
* A stretchable image to display behind the progress bar.
32
32
*/
33
33
trackImage ?: ImageSourcePropType ,
34
+
35
+ accessibilityLabel ?: String ,
34
36
} ;
35
37
export 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 {
51
51
else if (propertyName == " isIndeterminate" ) {
52
52
this ->IsIndeterminate (propertyValue.AsBoolean ());
53
53
}
54
+ else if (propertyName == " accessibilityLabel" ) {
55
+ if (!propertyValue.IsNull ()) {
56
+ this ->Name (to_hstring (propertyValue.AsString ()));
57
+ }
58
+ }
54
59
else if (propertyName == " progressImage" ) {
55
60
if (!propertyValue.IsNull ()) {
56
61
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 {
37
37
// IViewManagerWithNativeProperties
38
38
IMapView<hstring, ViewManagerPropertyType> ProgressViewViewManager::NativeProps () noexcept {
39
39
auto nativeProps = winrt::single_threaded_map<hstring, ViewManagerPropertyType>();
40
+ nativeProps.Insert (L" accessibilityLabel" , ViewManagerPropertyType::String);
40
41
nativeProps.Insert (L" progress" , ViewManagerPropertyType::Number);
41
42
nativeProps.Insert (L" progressTintColor" , ViewManagerPropertyType::Color);
42
43
nativeProps.Insert (L" trackTintColor" , ViewManagerPropertyType::Color);
You can’t perform that action at this time.
0 commit comments