2017-02-03 07:27:24 +00:00
|
|
|
/**
|
2018-09-11 22:27:47 +00:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2017-02-03 07:27:24 +00:00
|
|
|
*
|
2018-02-17 02:24:55 +00:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2017-02-03 07:27:24 +00:00
|
|
|
*
|
2018-05-11 02:06:46 +00:00
|
|
|
* @format
|
2018-06-20 07:35:29 +00:00
|
|
|
* @flow strict
|
2017-02-03 07:27:24 +00:00
|
|
|
*/
|
2018-05-11 02:06:46 +00:00
|
|
|
|
2017-02-03 07:27:24 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
export type AccessibilityTrait =
|
2018-05-11 02:06:46 +00:00
|
|
|
| 'none'
|
|
|
|
| 'button'
|
|
|
|
| 'link'
|
|
|
|
| 'header'
|
|
|
|
| 'search'
|
|
|
|
| 'image'
|
|
|
|
| 'selected'
|
|
|
|
| 'plays'
|
|
|
|
| 'key'
|
|
|
|
| 'text'
|
|
|
|
| 'summary'
|
|
|
|
| 'disabled'
|
|
|
|
| 'frequentUpdates'
|
|
|
|
| 'startsMedia'
|
|
|
|
| 'adjustable'
|
|
|
|
| 'allowsDirectInteraction'
|
|
|
|
| 'pageTurn';
|
2017-02-03 07:27:24 +00:00
|
|
|
|
2018-05-13 06:10:46 +00:00
|
|
|
export type AccessibilityTraits =
|
|
|
|
| AccessibilityTrait
|
|
|
|
| $ReadOnlyArray<AccessibilityTrait>;
|
|
|
|
|
2017-02-03 07:27:24 +00:00
|
|
|
export type AccessibilityComponentType =
|
2018-05-11 02:06:46 +00:00
|
|
|
| 'none'
|
|
|
|
| 'button'
|
|
|
|
| 'radiobutton_checked'
|
|
|
|
| 'radiobutton_unchecked';
|
2017-02-03 07:27:24 +00:00
|
|
|
|
2018-07-10 19:09:02 +00:00
|
|
|
export type AccessibilityRole =
|
|
|
|
| 'none'
|
|
|
|
| 'button'
|
2018-07-13 06:35:56 +00:00
|
|
|
| 'link'
|
|
|
|
| 'search'
|
2018-07-10 19:09:02 +00:00
|
|
|
| 'image'
|
|
|
|
| 'keyboardkey'
|
2018-07-13 06:35:56 +00:00
|
|
|
| 'text'
|
2018-07-17 01:38:37 +00:00
|
|
|
| 'adjustable'
|
2018-07-17 02:11:49 +00:00
|
|
|
| 'imagebutton'
|
|
|
|
| 'header'
|
|
|
|
| 'summary';
|
2018-07-10 19:09:02 +00:00
|
|
|
|
2018-08-24 17:38:42 +00:00
|
|
|
export type AccessibilityStates = $ReadOnlyArray<'disabled' | 'selected'>;
|
2018-07-17 02:01:27 +00:00
|
|
|
|
2017-02-03 07:27:24 +00:00
|
|
|
module.exports = {
|
|
|
|
AccessibilityTraits: [
|
|
|
|
'none',
|
|
|
|
'button',
|
|
|
|
'link',
|
|
|
|
'header',
|
|
|
|
'search',
|
|
|
|
'image',
|
|
|
|
'selected',
|
|
|
|
'plays',
|
|
|
|
'key',
|
|
|
|
'text',
|
|
|
|
'summary',
|
|
|
|
'disabled',
|
|
|
|
'frequentUpdates',
|
|
|
|
'startsMedia',
|
|
|
|
'adjustable',
|
|
|
|
'allowsDirectInteraction',
|
|
|
|
'pageTurn',
|
|
|
|
],
|
|
|
|
AccessibilityComponentTypes: [
|
|
|
|
'none',
|
|
|
|
'button',
|
|
|
|
'radiobutton_checked',
|
|
|
|
'radiobutton_unchecked',
|
|
|
|
],
|
2018-09-06 00:18:36 +00:00
|
|
|
// This must be kept in sync with the AccessibilityRolesMask in RCTViewManager.m
|
2018-07-10 19:09:02 +00:00
|
|
|
AccessibilityRoles: [
|
|
|
|
'none',
|
|
|
|
'button',
|
2018-07-13 06:35:56 +00:00
|
|
|
'link',
|
|
|
|
'search',
|
2018-07-10 19:09:02 +00:00
|
|
|
'image',
|
|
|
|
'keyboardkey',
|
|
|
|
'text',
|
2018-07-13 06:35:56 +00:00
|
|
|
'adjustable',
|
2018-07-17 01:38:37 +00:00
|
|
|
'imagebutton',
|
2018-07-17 02:11:49 +00:00
|
|
|
'header',
|
|
|
|
'summary',
|
2018-07-10 19:09:02 +00:00
|
|
|
],
|
2018-09-06 00:18:36 +00:00
|
|
|
// This must be kept in sync with the AccessibilityStatesMask in RCTViewManager.m
|
2018-07-19 20:47:39 +00:00
|
|
|
AccessibilityStates: ['selected', 'disabled'],
|
2017-02-03 07:27:24 +00:00
|
|
|
};
|