mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-13 09:20:50 +08:00
Summary: Assistive technologies use the accessibility role of a component to tell the disabled user what the component is, and provide hints about how to use it. Many important roles do not have analog AccessibilityTraits on iOS. This PR adds many critical roles, such as editabletext, checkbox, menu, and switch to name a few. Accessibility states are used to convey the current state of a component. This PR adds several critical states such as checked, unchecked, on and off. [general] [change] - Adds critical accessibility roles and states. Pull Request resolved: https://github.com/facebook/react-native/pull/24095 Differential Revision: D15079245 Pulled By: cpojer fbshipit-source-id: 941b30eb8f5d565597e5ea3a04687d9809cbe372
56 lines
1.0 KiB
JavaScript
56 lines
1.0 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
* @flow strict
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = {
|
|
// This must be kept in sync with the AccessibilityRolesMask in RCTViewManager.m
|
|
DeprecatedAccessibilityRoles: [
|
|
'none',
|
|
'button',
|
|
'link',
|
|
'search',
|
|
'image',
|
|
'keyboardkey',
|
|
'text',
|
|
'adjustable',
|
|
'imagebutton',
|
|
'header',
|
|
'summary',
|
|
'alert',
|
|
'checkbox',
|
|
'combobox',
|
|
'menu',
|
|
'menubar',
|
|
'menuitem',
|
|
'progressbar',
|
|
'radio',
|
|
'radiogroup',
|
|
'scrollbar',
|
|
'spinbutton',
|
|
'switch',
|
|
'tab',
|
|
'tablist',
|
|
'timer',
|
|
'toolbar',
|
|
],
|
|
// This must be kept in sync with the AccessibilityStatesMask in RCTViewManager.m
|
|
DeprecatedAccessibilityStates: [
|
|
'selected',
|
|
'disabled',
|
|
'checked',
|
|
'unchecked',
|
|
'busy',
|
|
'expanded',
|
|
'collapsed',
|
|
'hasPopup',
|
|
],
|
|
};
|