Default accessibility hint is read for buttons

Summary: [Android] [Fixed] - Make sure the default accessibility hint is read for buttons on Android.

Reviewed By: PeteTheHeat

Differential Revision: D16974987

fbshipit-source-id: e7b932041f82d41271d9393e651967789c05f38a
This commit is contained in:
Anda Bereczky
2019-08-23 15:18:53 -07:00
committed by Facebook Github Bot
parent 3b3c95b017
commit f8dff0bcb3
2 changed files with 7 additions and 0 deletions
@@ -290,6 +290,9 @@ public class ReactAccessibilityDelegate extends AccessibilityDelegateCompat {
} else if (role.equals(AccessibilityRole.IMAGEBUTTON)) {
nodeInfo.setRoleDescription(context.getString(R.string.imagebutton_description));
nodeInfo.setClickable(true);
} else if (role.equals(AccessibilityRole.BUTTON)) {
nodeInfo.setRoleDescription(context.getString(R.string.button_description));
nodeInfo.setClickable(true);
} else if (role.equals(AccessibilityRole.SUMMARY)) {
nodeInfo.setRoleDescription(context.getString(R.string.summary_description));
} else if (role.equals(AccessibilityRole.HEADER)) {