Skip to content
Permalink
Browse files
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
  • Loading branch information
Anda Bereczky authored and facebook-github-bot committed Aug 23, 2019
1 parent 3b3c95b commit f8dff0bcb3147b7a1aa8ac7159952d848e198e29
Showing 2 changed files with 7 additions and 0 deletions.
@@ -290,6 +290,9 @@ public static void setRole(
} 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)) {
@@ -12,6 +12,10 @@
name="image_description"
translatable="false"
>Image</string>
<string
name="button_description"
translatable="false"
>Button</string>
<string
name="imagebutton_description"
translatable="false"

0 comments on commit f8dff0b

Please sign in to comment.