Skip to content

Commit

Permalink
feat: Add "option" to available role values (#35137)
Browse files Browse the repository at this point in the history
Summary:
As pointed out by efoken on #34424 (comment) we forgot we add the `option` value to the `role` prop, so this PR adds this missing value as requested on #34424.

## Changelog

[General] [Added] - Add "option" to available role values

Pull Request resolved: #35137

Test Plan: Ensure that CI is green as there isn't much to test in this case because we're just adding a value that maps to `undefined`

Reviewed By: jacdebug

Differential Revision: D40849497

Pulled By: NickGerleman

fbshipit-source-id: 5e3e24c0ff05c361a7a8dc1ee1f20ba3fb6988ca
  • Loading branch information
gabrieldonadel authored and facebook-github-bot committed Oct 31, 2022
1 parent f3d9f2e commit e3e635e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Libraries/Components/View/ViewAccessibility.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ export type Role =
| 'navigation'
| 'none'
| 'note'
| 'option'
| 'presentation'
| 'progressbar'
| 'radio'
Expand Down
1 change: 1 addition & 0 deletions Libraries/Components/View/ViewAccessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export type Role =
| 'navigation'
| 'none'
| 'note'
| 'option'
| 'presentation'
| 'progressbar'
| 'radio'
Expand Down
2 changes: 2 additions & 0 deletions Libraries/Utilities/AcessibilityMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ export function getAccessibilityRoleFromRole(role: Role): ?AccessibilityRole {
return 'none';
case 'note':
return undefined;
case 'option':
return undefined;
case 'presentation':
return 'none';
case 'progressbar':
Expand Down

0 comments on commit e3e635e

Please sign in to comment.