Skip to content

Commit dcc5dbe

Browse files
fabOnReactfacebook-github-bot
authored andcommitted
adding togglebutton to attributedstring conversions (facebook#35632)
Summary: fixes runtime error `E/ReactNativeJNI(24576): Unsupported AccessibilityRole value: togglebutton` when using togglebutton accessibilityRole with Text. Related da899c0 ## Changelog [GENERAL] [FIXED] - Fixes crash when using togglebutton accessibilityRole with Text Pull Request resolved: facebook#35632 Reviewed By: lunaleaps Differential Revision: D42360628 Pulled By: rshest fbshipit-source-id: afca8f540d972e1df0c390b3dff8875f07804e97
1 parent 4c911a2 commit dcc5dbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactCommon/react/renderer/attributedstring/conversions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ inline void fromRawValue(
717717
auto string = (std::string)value;
718718
if (string == "none") {
719719
result = AccessibilityRole::None;
720-
} else if (string == "button") {
720+
} else if (string == "button" || string == "togglebutton") {
721721
result = AccessibilityRole::Button;
722722
} else if (string == "link") {
723723
result = AccessibilityRole::Link;

0 commit comments

Comments
 (0)