ankit-tailor and Facebook GitHub Bot
98d84e571d
Feat/accessibility state alias ( #34524 )
...
Summary:
This adds aliasing for accessibility state, it's used as requested on https://github.com/facebook/react-native/issues/34424 .
- [aria-disabled](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled ) to equivalent [accessibilityState.disabled](https://reactnative.dev/docs/accessibility#accessibilitystate )
- [aria-busy](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-busy ) to equivalent [accessibilityState.busy](https://reactnative.dev/docs/accessibility#accessibilitystate )
- [aria-checked](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-checked ) to equivalent [accessibilityState.checked](https://reactnative.dev/docs/accessibility#accessibilitystate )
- [aria-expanded](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded ) to equivalent [accessibilityState.expanded](https://reactnative.dev/docs/accessibility#accessibilitystate )
- [aria-selected](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected ) to equivalent [accessibilityState.selected](https://reactnative.dev/docs/accessibility#accessibilitystate )
## Changelog
[General] [Added] - Add aria-disabled, aria-busy, aria-checked, aria-expanded and aria-selected prop to core components
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
Pull Request resolved: https://github.com/facebook/react-native/pull/34524
Test Plan:
```js
<View
aria-disabled={true}
aria-selected={false}
aria-checked={true}
aria-expanded={true}
aria-busy={true}
style={{backgroundColor: '#527FE4', padding: 5}}>
<Text style={{fontSize: 11}}>Blue background</Text>
</View>
```
Reviewed By: cipolleschi
Differential Revision: D39137790
Pulled By: jacdebug
fbshipit-source-id: 27b5c56e91731ba36bb4754d9862286a7a8191bc
2022-09-08 03:38:39 -07:00
Tony Du and Facebook GitHub Bot
1e3cb91707
Allow multiline TextInputs be submittable without blurring ( #33653 )
...
Summary:
For multiline TextInputs, it's possible to send the submit event when pressing the return key only with `blurOnSubmit`. However, there's currently no way to do so without blurring the input and dismissing the keyboard. This problem is apparent when we want to use a TextInput to span multiple lines but still have it be submittable (but not blurrable), like one might want for a TODO list.

## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[General] [Added] - Add `returnKeyAction` prop to `TextInput` component
[General] [Deprecated] - Remove usages of `blurOnSubmit` in native code and convert `blurOnSubmit` to `returnKeyAction` in the JavaScript conversion layer
Pull Request resolved: https://github.com/facebook/react-native/pull/33653
Test Plan:
Verified old usages of combinations of `blurOnSubmit` and `multiline` matched previous behavior and that the new `returnKeyAction` prop behaves as expected.
| Android | iOS |
| --- | -- |
|  |  |
With the changes, the TODO list example from before now looks like this:

Reviewed By: yungsters
Differential Revision: D35735249
Pulled By: makovkastar
fbshipit-source-id: 1f2237a2a5e11dd141165d7568c91c9824bd6f25
2022-07-22 13:08:45 -07:00
Samuel Susla and Facebook GitHub Bot
8c6a98400e
Introduce TextInput.onChangeSync
...
Summary:
changelog: [internal]
Add experimental `TextInput.onChangeSync` which delivers onChange event synchronously.
Reviewed By: ShikaSD
Differential Revision: D33188083
fbshipit-source-id: 1e1dcd0d71c7eec98d3d5f69967659e07ac4e6a6
2021-12-30 06:38:50 -08:00
Nadiia D and Facebook GitHub Bot
9be3356e02
replace defaultProps usage in functional components
...
Summary:
Changelog:
[General] [Removed] - Replace defaultProps usage in functional components
Reviewed By: kacieb
Differential Revision: D24907836
fbshipit-source-id: 05c7381b66c7738790eff5fea594791c3ecfa12e
2020-11-13 17:07:11 -08:00
Tim Yung and Facebook GitHub Bot
a1ac2518a3
TextInput: Default blurOnSubmit in JS
...
Summary:
Consolidates the logic for the default value of `blurOnSubmit` on `TextInput` in the JavaScript component.
This only materially impacts Fabric.
Changelog:
[Internal]
Reviewed By: mdvacca
Differential Revision: D21491482
fbshipit-source-id: 16d8aba32e7d0321a4583e87e03405ea587e35d4
2020-05-09 17:24:19 -07:00
Samuel Susla and Facebook GitHub Bot
00c4d950cf
Implement event count for TextInput
...
Summary:
Changelog: [Internal]
Implementation of event count for Fabric's Text input.
Reviewed By: JoshuaGross
Differential Revision: D20800185
fbshipit-source-id: 988692cb2fc786649821cccb06e629b40b9b0479
2020-04-09 03:44:55 -07:00
Eli White and Facebook Github Bot
e483bd4d49
Add Jest snapshot tests to TextInput
...
Summary:
$title
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D18536359
fbshipit-source-id: 382c81c094c0ae28ec3e203cb0726bdbccf755dc
2019-11-20 18:09:30 -08:00
Brandon Carroll and Facebook Github Bot
de12b98cd5
WIP: add snapshots for mocked and unmocked components ( #24554 )
...
Summary:
Per a conversation with TheSavior, in #24538 , this adds snapshot tests for all components whose mocks will be addressed in that PR. Shallow and deep snapshots are included.
[General] [Added] - Snapshots
Pull Request resolved: https://github.com/facebook/react-native/pull/24554
Differential Revision: D15062197
Pulled By: cpojer
fbshipit-source-id: 70ddbaa5e6d1d2c0fd1130ab04c458d9c49d0ee8
2019-04-24 06:52:20 -07:00