react-native/React
Mats Byrkeland 253b29dbd8 Add accessibilityHint for iOS (#18093)
Summary:
This adds the accessibilityHint for View, Text and Touchable* on iOS.
The accessibilityHint provides some more information about an element
when the accessibilityLabel is not enough.

The accessibilityHint is a core accessibility property on iOS.

From https://developer.apple.com/documentation/objectivec/nsobject/1615093-accessibilityhint:
> An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.

Related issue: https://github.com/facebook/react-native/issues/14706

The npm scripts `test`, `flow`, `lint` and `prettier` are satisfied.

I added a couple of examples to the RNTester app. The Accessibility Inspector on Mac helps debugging accessibility stuff on a simulator, but it does not show the accessibilityHint. Therefore I tested the RNTester app on an iPhone 8 device using VoiceOver to verify the hint functionality. It works fine, and I've tested disabling and enabling "read hints" in the VoiceOver settings on the phone.

https://github.com/facebook/react-native-website/pull/222

[IOS][FEATURE][Accessibility] - Add accessibilityHint for View, Text, Touchable* on iOS
Closes https://github.com/facebook/react-native/pull/18093

Reviewed By: hramos

Differential Revision: D7230780

Pulled By: ziqichen6

fbshipit-source-id: 172ad28dc9ae2b67ea256100f6acb939f2466d0b
2018-07-25 17:47:42 -07:00
..
Base Use module copies in RCTBridge APIs 2018-07-23 14:47:45 -07:00
CxxBridge Use module copies in RCTBridge APIs 2018-07-23 14:47:45 -07:00
CxxModule Update license headers for MIT license 2018-02-16 18:31:53 -08:00
CxxUtils Update license headers for MIT license 2018-02-16 18:31:53 -08:00
DevSupport Hiding pre-bundled notification when not on dev mode 2018-07-17 07:17:09 -07:00
Fabric Fabric: Events related classes were moved to separate buck target 2018-07-17 22:53:57 -07:00
Inspector Migrate Android sources to MIT license header 2018-05-31 15:37:30 -07:00
Modules Replace deprecated `UILineBreakModeWordWrap` with `NSLineBreakByWordWrapping` (#19791) 2018-07-15 00:16:32 -07:00
Profiler Update license headers for MIT license 2018-02-16 18:31:53 -08:00
React.xcodeproj Update Xcode projects (#19574) 2018-06-19 23:48:12 -07:00
UIUtils Update license headers for MIT license 2018-02-16 18:31:53 -08:00
Views Add accessibilityHint for iOS (#18093) 2018-07-25 17:47:42 -07:00
third-party.xcconfig OSS: upgrade Folly 2016.09.26 => 2016.10.31 2018-04-13 17:33:23 -07:00