diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm index 500c0815f58c..228ec0d2a28f 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm @@ -138,6 +138,17 @@ - (void)updateState:(const State::Shared &)state oldState:(const State::Shared & _textView.state = std::static_pointer_cast(state); [_textView setNeedsDisplay]; [self setNeedsLayout]; + + // If the attributed string has changed, we need to notify the accessibility system that something changed, + // otherwise it may hold on to stale values (this happens most often when an element is updated async) + // https://github.com/react/react-native/issues/58145 + if (state && oldState) { + const auto &newData = std::static_pointer_cast(state)->getData(); + const auto &oldData = std::static_pointer_cast(oldState)->getData(); + if (!newData.attributedString.isContentEqual(oldData.attributedString)) { + UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, nil); + } + } } - (void)updateLayoutMetrics:(const LayoutMetrics &)layoutMetrics