Fix nested Text.rich semantics order#186116
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the semantics configuration logic in RenderParagraph to process text information sequentially and introduces the _childConfigBelongsToPlaceholder helper method for tag validation. It also adds a test case for nested rich text semantics. Feedback suggests adding documentation to the new private method to align with the repository style guide.
Renzo-Olivares
left a comment
There was a problem hiding this comment.
LGTM, w some small comments.
Renzo-Olivares
left a comment
There was a problem hiding this comment.
LGTM, this will need a secondary reviewer before landing. Thank you for the contribution!
|
autosubmit label was removed for flutter/flutter/186116, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR. |
flutter/flutter@0541913...1ceffd1 2026-05-14 ikramhasan.dev@gmail.com Fix selection highlight artifacts for faded selectable text (flutter/flutter#183628) 2026-05-14 46920873+gabrimatic@users.noreply.github.com Fix nested Text.rich semantics order (flutter/flutter#186116) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Fixes #176570
Nested
Text.richwidgets can inherit placeholder semantics tags from ancestor paragraphs. When those inherited tags reuse the same placeholder index as the nested paragraph,RenderParagraphcan merge all placeholder child semantics before the inline text segment.This emits combined text semantics in span order and matches placeholder children against the direct placeholder tag so nested widget spans keep their accessibility label order.
Tests:
../../bin/flutter test test/widgets/text_test.dart --plain-name='semantics label is in order with nested rich text widget spans'../../bin/flutter test test/widgets/text_test.dart../../bin/flutter analyze --no-pub lib/src/rendering/paragraph.dart test/widgets/text_test.dart