Fabric: Propper support for accessibilityLabel in RCTParagraphComponentView

Summary:
@public
This approach is basically copying exising implementation that we have in RCTTextView (D5806097).
Changes in `AttributedString` is quite trivial.

Reviewed By: mdvacca

Differential Revision: D8740000

fbshipit-source-id: 276afdf93d777f7ccb99ca8ee5a18a880de2acbf
This commit is contained in:
Valentin Shergin
2018-07-17 17:51:17 -07:00
committed by Facebook Github Bot
parent c68c3a53d4
commit 732c3a4f4e
3 changed files with 29 additions and 0 deletions

View File

@@ -39,6 +39,14 @@ const std::vector<Fragment> &AttributedString::getFragments() const {
return fragments_;
}
std::string AttributedString::getString() const {
std::string string;
for (const auto &fragment : fragments_) {
string += fragment.string;
}
return string;
}
#pragma mark - DebugStringConvertible
SharedDebugStringConvertibleList AttributedString::getDebugChildren() const {