react-native-windows 0.71.13 → 0.71.14

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.
@@ -1498,6 +1498,12 @@ function InternalTextInput(props: Props): React.Node {
1498
1498
  selected: props['aria-selected'] ?? props.accessibilityState?.selected,
1499
1499
  };
1500
1500
 
1501
+ if (focusable && !accessible) {
1502
+ console.warn(
1503
+ 'All focusable views should report proper accessiblity information. TextInputs marked as focusable should always be accessible.',
1504
+ );
1505
+ }
1506
+
1501
1507
  if (Platform.OS === 'ios') {
1502
1508
  const RCTTextInputView =
1503
1509
  props.multiline === true
@@ -160,6 +160,19 @@ const View: React.AbstractComponent<
160
160
  return updatedChildren;
161
161
  }
162
162
  };
163
+
164
+ const _focusable = tabIndex !== undefined ? !tabIndex : focusable;
165
+ const _accessible =
166
+ importantForAccessibility === 'no-hide-descendants'
167
+ ? false
168
+ : otherProps.accessible;
169
+
170
+ if (_focusable === true && _accessible === false) {
171
+ console.warn(
172
+ 'All focusable views should report proper accessiblity information. Views marked as focusable should always be accessible.',
173
+ );
174
+ }
175
+
163
176
  // Windows]
164
177
 
165
178
  return (
@@ -182,7 +195,7 @@ const View: React.AbstractComponent<
182
195
  : ariaLive ?? accessibilityLiveRegion
183
196
  }
184
197
  accessibilityLabel={ariaLabel ?? accessibilityLabel}
185
- focusable={tabIndex !== undefined ? !tabIndex : focusable}
198
+ focusable={_focusable}
186
199
  accessibilityState={_accessibilityState}
187
200
  accessibilityRole={
188
201
  role ? getAccessibilityRoleFromRole(role) : accessibilityRole
@@ -206,11 +219,7 @@ const View: React.AbstractComponent<
206
219
  onKeyUp={_keyUp}
207
220
  onKeyUpCapture={_keyUpCapture}
208
221
  // [Windows
209
- accessible={
210
- importantForAccessibility === 'no-hide-descendants'
211
- ? false
212
- : otherProps.accessible
213
- }
222
+ accessible={_accessible}
214
223
  children={
215
224
  importantForAccessibility === 'no-hide-descendants'
216
225
  ? childrenWithImportantForAccessibility(otherProps.children)
@@ -121,12 +121,9 @@ void ControlViewManager::SetLayoutProps(
121
121
 
122
122
  void ControlViewManager::OnPropertiesUpdated(ShadowNodeBase *node) {
123
123
  auto control(node->GetView().as<xaml::Controls::Control>());
124
-
125
- // If developer specifies either the accessible and focusable prop to be false
126
- // remove accessibility and keyboard focus for component.
127
- const auto isTabStop = (node->IsAccessible() && node->IsFocusable());
128
- const auto accessibilityView =
129
- isTabStop ? xaml::Automation::Peers::AccessibilityView::Content : xaml::Automation::Peers::AccessibilityView::Raw;
124
+ const auto isTabStop = node->IsFocusable();
125
+ const auto accessibilityView = node->IsAccessible() ? xaml::Automation::Peers::AccessibilityView::Content
126
+ : xaml::Automation::Peers::AccessibilityView::Raw;
130
127
  control.IsTabStop(isTabStop);
131
128
  xaml::Automation::AutomationProperties::SetAccessibilityView(control, accessibilityView);
132
129
  }
@@ -588,18 +588,12 @@ void ViewViewManager::TryUpdateView(
588
588
  }
589
589
 
590
590
  void ViewViewManager::SyncFocusableAndAccessible(ViewShadowNode *pViewShadowNode, bool useControl) {
591
- // If developer specifies either the accessible and focusable prop to be false
592
- // remove accessibility and keyboard focus for component. Exception is made
593
- // for case where a View with undefined onPress is specified, where
594
- // component gains accessibility focus when either the accessible and focusable prop are true.
595
591
  if (useControl) {
596
592
  const auto isFocusable = pViewShadowNode->IsFocusable();
597
593
  const auto isAccessible = pViewShadowNode->IsAccessible();
598
- const auto isPressable = pViewShadowNode->OnClick();
599
- const auto isTabStop =
600
- (isPressable && isFocusable && isAccessible) || (!isPressable && (isFocusable || isAccessible));
601
- const auto accessibilityView = isTabStop ? xaml::Automation::Peers::AccessibilityView::Content
602
- : xaml::Automation::Peers::AccessibilityView::Raw;
594
+ const auto isTabStop = isFocusable;
595
+ const auto accessibilityView = isAccessible ? xaml::Automation::Peers::AccessibilityView::Content
596
+ : xaml::Automation::Peers::AccessibilityView::Raw;
603
597
  pViewShadowNode->GetControl().IsTabStop(isTabStop);
604
598
  xaml::Automation::AutomationProperties::SetAccessibilityView(pViewShadowNode->GetControl(), accessibilityView);
605
599
  }
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.71.13</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.71.14</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>71</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>13</ReactNativeWindowsPatch>
16
+ <ReactNativeWindowsPatch>14</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>f54d249fcac7999eefbc155fa2f23b1b33619e8b</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>af7e085f5462a7dbca69a6816ece21f65638971f</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.71.13",
3
+ "version": "0.71.14",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",