mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 20:25:33 +08:00
- remove accessibilityComponentType and accessibilityTraits props (a11y) (#24344)
Summary: Closes: https://github.com/facebook/react-native/issues/24016 React Native 0.57 introduced cross-platform `accessibilityRole` and `accessibilityStates` props in order to replace `accessibilityComponentType` (for android) and `accessibilityTraits` (for iOS). With #24095 `accessibilityRole` and `accessibilityStates` will increase, receiving more options, which seems to be a good moment to remove deprecated props. Remove deprecated `accessibilityComponentType` and `accessibilityTraits` props. [General] [Removed] - Remove accessibilityComponentType and accessibilityTraits props Pull Request resolved: https://github.com/facebook/react-native/pull/24344 Reviewed By: rickhanlonii Differential Revision: D14842214 Pulled By: cpojer fbshipit-source-id: 279945e503d8a23bfee7a49d42f5db490c5f6069
This commit is contained in:
committed by
Facebook Github Bot
parent
57c1a7add2
commit
f70e58f355
@@ -11,31 +11,6 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
DeprecatedAccessibilityTraits: [
|
||||
'none',
|
||||
'button',
|
||||
'link',
|
||||
'header',
|
||||
'search',
|
||||
'image',
|
||||
'selected',
|
||||
'plays',
|
||||
'key',
|
||||
'text',
|
||||
'summary',
|
||||
'disabled',
|
||||
'frequentUpdates',
|
||||
'startsMedia',
|
||||
'adjustable',
|
||||
'allowsDirectInteraction',
|
||||
'pageTurn',
|
||||
],
|
||||
DeprecatedAccessibilityComponentTypes: [
|
||||
'none',
|
||||
'button',
|
||||
'radiobutton_checked',
|
||||
'radiobutton_unchecked',
|
||||
],
|
||||
// This must be kept in sync with the AccessibilityRolesMask in RCTViewManager.m
|
||||
DeprecatedAccessibilityRoles: [
|
||||
'none',
|
||||
|
||||
@@ -17,8 +17,6 @@ const DeprecatedStyleSheetPropType = require('DeprecatedStyleSheetPropType');
|
||||
const DeprecatedViewStylePropTypes = require('DeprecatedViewStylePropTypes');
|
||||
|
||||
const {
|
||||
DeprecatedAccessibilityComponentTypes,
|
||||
DeprecatedAccessibilityTraits,
|
||||
DeprecatedAccessibilityRoles,
|
||||
DeprecatedAccessibilityStates,
|
||||
} = require('DeprecatedViewAccessibility');
|
||||
@@ -69,18 +67,6 @@ module.exports = {
|
||||
*/
|
||||
accessibilityIgnoresInvertColors: PropTypes.bool,
|
||||
|
||||
/**
|
||||
* Indicates to accessibility services to treat UI component like a
|
||||
* native one. Works for Android only.
|
||||
*
|
||||
* @platform android
|
||||
*
|
||||
* See http://facebook.github.io/react-native/docs/view.html#accessibilitycomponenttype
|
||||
*/
|
||||
accessibilityComponentType: PropTypes.oneOf(
|
||||
DeprecatedAccessibilityComponentTypes,
|
||||
),
|
||||
|
||||
/**
|
||||
* Indicates to accessibility services to treat UI component like a specific role.
|
||||
*/
|
||||
@@ -118,21 +104,6 @@ module.exports = {
|
||||
'no-hide-descendants',
|
||||
]),
|
||||
|
||||
/**
|
||||
* Provides additional traits to screen reader. By default no traits are
|
||||
* provided unless specified otherwise in element.
|
||||
*
|
||||
* You can provide one trait or an array of many traits.
|
||||
*
|
||||
* @platform ios
|
||||
*
|
||||
* See http://facebook.github.io/react-native/docs/view.html#accessibilitytraits
|
||||
*/
|
||||
accessibilityTraits: PropTypes.oneOfType([
|
||||
PropTypes.oneOf(DeprecatedAccessibilityTraits),
|
||||
PropTypes.arrayOf(PropTypes.oneOf(DeprecatedAccessibilityTraits)),
|
||||
]),
|
||||
|
||||
/**
|
||||
* A value indicating whether VoiceOver should ignore the elements
|
||||
* within views that are siblings of the receiver.
|
||||
|
||||
Reference in New Issue
Block a user