react-native-windows 0.72.0-preview.5 → 0.72.0-preview.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Components/TextInput/TextInput.windows.js +6 -0
- package/Libraries/Components/View/View.windows.js +15 -6
- package/Libraries/Text/Text.windows.js +31 -4
- package/Microsoft.ReactNative/Views/ControlViewManager.cpp +3 -6
- package/Microsoft.ReactNative/Views/ViewViewManager.cpp +3 -10
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/package.json +1 -1
|
@@ -1527,6 +1527,12 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1527
1527
|
};
|
|
1528
1528
|
}
|
|
1529
1529
|
|
|
1530
|
+
if (focusable && !accessible) {
|
|
1531
|
+
console.warn(
|
|
1532
|
+
'All focusable views should report proper accessiblity information. TextInputs marked as focusable should always be accessible.',
|
|
1533
|
+
);
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1530
1536
|
// $FlowFixMe[underconstrained-implicit-instantiation]
|
|
1531
1537
|
let style = flattenStyle(props.style);
|
|
1532
1538
|
|
|
@@ -183,6 +183,19 @@ const View: React.AbstractComponent<
|
|
|
183
183
|
return updatedChildren;
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
|
+
|
|
187
|
+
const _focusable = tabIndex !== undefined ? !tabIndex : focusable;
|
|
188
|
+
const _accessible =
|
|
189
|
+
importantForAccessibility === 'no-hide-descendants'
|
|
190
|
+
? false
|
|
191
|
+
: otherProps.accessible;
|
|
192
|
+
|
|
193
|
+
if (_focusable === true && _accessible === false) {
|
|
194
|
+
console.warn(
|
|
195
|
+
'All focusable views should report proper accessiblity information. Views marked as focusable should always be accessible.',
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
|
|
186
199
|
// Windows]
|
|
187
200
|
|
|
188
201
|
return (
|
|
@@ -205,7 +218,7 @@ const View: React.AbstractComponent<
|
|
|
205
218
|
: ariaLive ?? accessibilityLiveRegion
|
|
206
219
|
}
|
|
207
220
|
accessibilityLabel={ariaLabel ?? accessibilityLabel}
|
|
208
|
-
focusable={
|
|
221
|
+
focusable={_focusable}
|
|
209
222
|
disabled={disabled}
|
|
210
223
|
accessibilityState={_accessibilityState}
|
|
211
224
|
accessibilityRole={
|
|
@@ -230,11 +243,7 @@ const View: React.AbstractComponent<
|
|
|
230
243
|
onKeyUp={_keyUp}
|
|
231
244
|
onKeyUpCapture={_keyUpCapture}
|
|
232
245
|
// [Windows
|
|
233
|
-
accessible={
|
|
234
|
-
importantForAccessibility === 'no-hide-descendants'
|
|
235
|
-
? false
|
|
236
|
-
: otherProps.accessible
|
|
237
|
-
}
|
|
246
|
+
accessible={_accessible}
|
|
238
247
|
children={
|
|
239
248
|
importantForAccessibility === 'no-hide-descendants'
|
|
240
249
|
? childrenWithImportantForAccessibility(otherProps.children)
|
|
@@ -208,6 +208,7 @@ const Text: React.AbstractComponent<
|
|
|
208
208
|
|
|
209
209
|
const _accessible = Platform.select({
|
|
210
210
|
ios: accessible !== false,
|
|
211
|
+
windows: accessible !== false,
|
|
211
212
|
default: accessible,
|
|
212
213
|
});
|
|
213
214
|
|
|
@@ -307,13 +308,26 @@ const Text: React.AbstractComponent<
|
|
|
307
308
|
<NativeText
|
|
308
309
|
{...textPropsLessStyle}
|
|
309
310
|
{...eventHandlersForText}
|
|
310
|
-
|
|
311
|
+
accessibilityLabel={ariaLabel ?? accessibilityLabel}
|
|
312
|
+
accessibilityRole={
|
|
313
|
+
role ? getAccessibilityRoleFromRole(role) : accessibilityRole
|
|
314
|
+
}
|
|
315
|
+
accessibilityState={nativeTextAccessibilityState}
|
|
316
|
+
accessible={
|
|
317
|
+
accessible == null && Platform.OS === 'android'
|
|
318
|
+
? _hasOnPressOrOnLongPress
|
|
319
|
+
: _accessible
|
|
320
|
+
}
|
|
311
321
|
allowFontScaling={allowFontScaling !== false}
|
|
322
|
+
disabled={_disabled}
|
|
312
323
|
ellipsizeMode={ellipsizeMode ?? 'tail'}
|
|
313
324
|
isHighlighted={isHighlighted}
|
|
325
|
+
nativeID={id ?? nativeID}
|
|
326
|
+
numberOfLines={numberOfLines}
|
|
327
|
+
ref={forwardedRef}
|
|
328
|
+
selectable={_selectable}
|
|
314
329
|
selectionColor={selectionColor}
|
|
315
330
|
style={((rest: any): TextStyleProp)}
|
|
316
|
-
ref={forwardedRef}
|
|
317
331
|
/>
|
|
318
332
|
</TextAncestor.Provider>
|
|
319
333
|
</View>
|
|
@@ -324,13 +338,26 @@ const Text: React.AbstractComponent<
|
|
|
324
338
|
<NativeText
|
|
325
339
|
{...restProps}
|
|
326
340
|
{...eventHandlersForText}
|
|
327
|
-
|
|
341
|
+
accessibilityLabel={ariaLabel ?? accessibilityLabel}
|
|
342
|
+
accessibilityRole={
|
|
343
|
+
role ? getAccessibilityRoleFromRole(role) : accessibilityRole
|
|
344
|
+
}
|
|
345
|
+
accessibilityState={nativeTextAccessibilityState}
|
|
346
|
+
accessible={
|
|
347
|
+
accessible == null && Platform.OS === 'android'
|
|
348
|
+
? _hasOnPressOrOnLongPress
|
|
349
|
+
: _accessible
|
|
350
|
+
}
|
|
328
351
|
allowFontScaling={allowFontScaling !== false}
|
|
352
|
+
disabled={_disabled}
|
|
329
353
|
ellipsizeMode={ellipsizeMode ?? 'tail'}
|
|
330
354
|
isHighlighted={isHighlighted}
|
|
355
|
+
nativeID={id ?? nativeID}
|
|
356
|
+
numberOfLines={numberOfLines}
|
|
357
|
+
ref={forwardedRef}
|
|
358
|
+
selectable={_selectable}
|
|
331
359
|
selectionColor={selectionColor}
|
|
332
360
|
style={style}
|
|
333
|
-
ref={forwardedRef}
|
|
334
361
|
/>
|
|
335
362
|
</TextAncestor.Provider>
|
|
336
363
|
);
|
|
@@ -125,12 +125,9 @@ void ControlViewManager::SetLayoutProps(
|
|
|
125
125
|
|
|
126
126
|
void ControlViewManager::OnPropertiesUpdated(ShadowNodeBase *node) {
|
|
127
127
|
auto control(node->GetView().as<xaml::Controls::Control>());
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
const auto isTabStop = !node->IsDisable() && (node->IsAccessible() && node->IsFocusable());
|
|
132
|
-
const auto accessibilityView =
|
|
133
|
-
isTabStop ? xaml::Automation::Peers::AccessibilityView::Content : xaml::Automation::Peers::AccessibilityView::Raw;
|
|
128
|
+
const auto isTabStop = !node->IsDisable() && node->IsFocusable();
|
|
129
|
+
const auto accessibilityView = node->IsAccessible() ? xaml::Automation::Peers::AccessibilityView::Content
|
|
130
|
+
: xaml::Automation::Peers::AccessibilityView::Raw;
|
|
134
131
|
control.IsTabStop(isTabStop);
|
|
135
132
|
xaml::Automation::AutomationProperties::SetAccessibilityView(control, accessibilityView);
|
|
136
133
|
}
|
|
@@ -595,20 +595,13 @@ void ViewViewManager::TryUpdateView(
|
|
|
595
595
|
}
|
|
596
596
|
|
|
597
597
|
void ViewViewManager::SyncFocusableAndAccessible(ViewShadowNode *pViewShadowNode, bool useControl) {
|
|
598
|
-
// If developer specifies either the accessible and focusable prop to be false
|
|
599
|
-
// remove accessibility and keyboard focus for component. Exception is made
|
|
600
|
-
// for case where a View with undefined onPress is specified, where
|
|
601
|
-
// component gains accessibility focus when either the accessible and focusable prop are true.
|
|
602
598
|
if (useControl) {
|
|
603
599
|
const auto isFocusable = pViewShadowNode->IsFocusable();
|
|
604
600
|
const auto isAccessible = pViewShadowNode->IsAccessible();
|
|
605
|
-
const auto isPressable = pViewShadowNode->OnClick();
|
|
606
601
|
const auto isDisabled = pViewShadowNode->IsDisable();
|
|
607
|
-
const auto isTabStop =
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
const auto accessibilityView = isTabStop ? xaml::Automation::Peers::AccessibilityView::Content
|
|
611
|
-
: xaml::Automation::Peers::AccessibilityView::Raw;
|
|
602
|
+
const auto isTabStop = !isDisabled && isFocusable;
|
|
603
|
+
const auto accessibilityView = isAccessible ? xaml::Automation::Peers::AccessibilityView::Content
|
|
604
|
+
: xaml::Automation::Peers::AccessibilityView::Raw;
|
|
612
605
|
pViewShadowNode->GetControl().IsTabStop(isTabStop);
|
|
613
606
|
xaml::Automation::AutomationProperties::SetAccessibilityView(pViewShadowNode->GetControl(), accessibilityView);
|
|
614
607
|
}
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.72.0-preview.
|
|
13
|
+
<ReactNativeWindowsVersion>0.72.0-preview.6</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>72</ReactNativeWindowsMinor>
|
|
16
16
|
<ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>b9a2d51896667aadcd9a7c497631ca96fe0d1ca4</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|