d3f0919816
Summary: Implemented a version of accessibility Hints on android by adding hint text to the end of contentDescription. There is already an existing prop on js and iOS implementation. Changes involve: * adding a prop on native android code for accessibilityHints * setting the accessibilityDelegate after the props are all loaded. * Instead of directly updating the accessibility delegate, the prop setters now update state by setting the values of the variables. Once all props are set, the accessibility delegate is set based on the props * BaseViewManager keeps track of whether or not accessibility props have been set * AccessibilityDelegateUtil keeps track of what the props have been set to. (Renamed AccessibilityRoleUtil to AccessibilityDelegateUtil) Currently, this is the easiest way of emulating the way accessibility hints work on iOS, and I think having an android counter part is better than having nothing. It's different from iOS in that it will announce the hint before the role, and also cannot be turned off. Ex: if I set the accessibility like this: ``` <View style={styles.container} accessible={true} accessibilityLabel="accessibility label" accessibilityRole="button" accessibilityStates={['selected']} accessibilityHint="accessibility Hint"> <Text> Tester </Text> </View> ``` Talk back will read: `accessibility label, accessibility Hint, button, selected` In the future for next steps, I plan on investigating the process of making a second announcement after the first Reviewed By: achen1 Differential Revision: D9037226 fbshipit-source-id: 8d484e1114eb69aa5f5314b3755b351b8ea80b09 |
||
---|---|---|
.. | ||
libs | ||
src | ||
.npmignore | ||
DevExperience.md | ||
README.md | ||
build.gradle | ||
gradle.properties | ||
proguard-rules.pro | ||
release.gradle |
README.md
Building React Native for Android
See the docs on the website.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.