Skip to content

Commit

Permalink
Default accessibility hint is read for buttons
Browse files Browse the repository at this point in the history
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 f8dff0b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f8dff0b

Please sign in to comment.