adding togglebutton to attributedstring conversions (#35632)

Summary:
fixes runtime error `E/ReactNativeJNI(24576): Unsupported AccessibilityRole value: togglebutton` when using togglebutton accessibilityRole with Text. Related https://github.com/fabriziobertoglio1987/react-native/commit/da899c0cc4372830e5ca053a096b74fff2a19cb8

## Changelog

[GENERAL] [FIXED] - Fixes crash when using togglebutton accessibilityRole with Text

Pull Request resolved: https://github.com/facebook/react-native/pull/35632

Reviewed By: lunaleaps

Differential Revision: D42360628

Pulled By: rshest

fbshipit-source-id: afca8f540d972e1df0c390b3dff8875f07804e97
This commit is contained in:
fabriziobertoglio1987
2023-01-05 12:11:46 -08:00
committed by Facebook GitHub Bot
parent 4c911a2dec
commit dcc5dbe562
@@ -717,7 +717,7 @@ inline void fromRawValue(
auto string = (std::string)value;
if (string == "none") {
result = AccessibilityRole::None;
} else if (string == "button") {
} else if (string == "button" || string == "togglebutton") {
result = AccessibilityRole::Button;
} else if (string == "link") {
result = AccessibilityRole::Link;