Skip to content

Commit

Permalink
added image button as option for accessibility role
Browse files Browse the repository at this point in the history
Summary:
Because we're now separating accessibilityTraits into accessibilityRole and accessibilityState, we're going to only allow one role to be set, and allow one preset combinations of roles that make sense.

This diff adds image button as a role.

Reviewed By: PeteTheHeat

Differential Revision: D8846958

fbshipit-source-id: dad3783654b20abeb29767cdad7450d1896058c2
  • Loading branch information
Ziqi Chen authored and facebook-github-bot committed Jul 17, 2018
1 parent 10ebcbc commit 10b603f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Libraries/Components/View/ViewAccessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ export type AccessibilityRole =
| 'image'
| 'keyboardkey'
| 'text'
| 'adjustable';
| 'adjustable'
| 'imagebutton';

module.exports = {
AccessibilityTraits: [
Expand Down Expand Up @@ -84,5 +85,6 @@ module.exports = {
'keyboardkey',
'text',
'adjustable',
'imagebutton',
],
};

0 comments on commit 10b603f

Please sign in to comment.