[change] Explicitly forward props and introduce unstable_{ariaSet,dataSet}

Rather than filtering props, they are explicitly forwarded in each component.
This makes it easier to see exactly which props are being forwarded to host
components by each React Native component. Two new props - `unstable_ariaSet`
and `unstable_dataSet` - are introduced to avoid iterating over props to find
`aria` and `data` props.

The `accessibilityValue` prop is also implemented.
This commit is contained in:
Nicolas Gallagher
2020-02-06 11:23:20 -08:00
parent 654f65e3e0
commit 8952eccf86
17 changed files with 591 additions and 217 deletions
@@ -3,12 +3,12 @@ import PropTypes, { any, bool, func, object, oneOf, string } from 'prop-types';
const ofProps = () => {};
ofProps.propTypes = {
/* test */
accessibilityLabel: PropTypes.string,
accessibilityLiveRegion: oneOf(['assertive', 'none', 'polite']),
accessibilityRelationship: object,
accessibilityRole: string,
accessibilityState: object,
accessibilityValue: object,
accessible: bool,
children: any,
forwardedRef: any,
@@ -89,6 +89,10 @@ assistive technologies of a `role` value change.
...
### accessibilityValue: ?object
...
### accessible
When `true`, indicates that the view is an accessibility element. When a view