Skip to content

Commit e3e635e

Browse files
gabrieldonadelfacebook-github-bot
authored andcommitted
feat: Add "option" to available role values (#35137)
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
1 parent f3d9f2e commit e3e635e

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

Libraries/Components/View/ViewAccessibility.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ export type Role =
330330
| 'navigation'
331331
| 'none'
332332
| 'note'
333+
| 'option'
333334
| 'presentation'
334335
| 'progressbar'
335336
| 'radio'

Libraries/Components/View/ViewAccessibility.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export type Role =
8585
| 'navigation'
8686
| 'none'
8787
| 'note'
88+
| 'option'
8889
| 'presentation'
8990
| 'progressbar'
9091
| 'radio'

Libraries/Utilities/AcessibilityMapping.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ export function getAccessibilityRoleFromRole(role: Role): ?AccessibilityRole {
9292
return 'none';
9393
case 'note':
9494
return undefined;
95+
case 'option':
96+
return undefined;
9597
case 'presentation':
9698
return 'none';
9799
case 'progressbar':

0 commit comments

Comments
 (0)