Skip to content

Conversation

@MritunjayTiwari14
Copy link
Contributor

@MritunjayTiwari14 MritunjayTiwari14 commented Nov 2, 2025

Fixes #1963.

Displaying Semantic widget tree by wrapping the required widget with SemanticDebugger .

Possible Cause: Flutter Automatically rearranging the semantics nodes in wrong order?

Changes Displayed using SemanticsDebugger widget(Updated)

### Clearly the Semantic Widget Tree is cleaned and is in proper order after incorporating the changes.

Before(Turned Off Debugger) Before(Turned On Debugger) After(Turned On Debugger)
1000053632 1000053634 Screenshot_20251102_174128

Changes Done And their respective significance:

  1. Added 'Semantic' Widget over the Columns of message content to make sure the flutter does not reorder them as per its wish and provide them as isolated semantics in same order as they are placed in widget tree.

  2. Added 'MergeSemantics' Widget over the InheritedMessage to merge semantic nodes in the same order as they were given i.e after isolating them they were passed in the same order as that of the widget tree.

  3. Added 'MergeSemantics' in MessageWithPossibleSender to make sure when the user click the message box, i.e. click even the avatar of message receipt it should read the message of the user, not just the user name and the time it was sent at(Before the changes implemented in this PR it used to do that!). This implementation was taken from WhatsApp where a similar behavior was observed that even clicking the avatar of the message receipt activated the whole message to be talked aloud instead of just the receipt name and time it was sent at.

@gnprice
Copy link
Member

gnprice commented Nov 3, 2025

Clearly the Semantic Widget Tree is cleaned and is in proper order after incorporating the changes.

Hmm. Looking at your "after" screenshot, the text isn't in the right order. For example:
image

This seems like something you should be able to notice for yourself before submitting a PR for review. It's not a good use of reviewers' time to have to catch this. If errors like this are getting through, that's a sign you should be spending more time carefully checking your work before you ask others to review it.

@MritunjayTiwari14
Copy link
Contributor Author

MritunjayTiwari14 commented Nov 4, 2025

Thank you @gnprice for noticing the miscommunication, I have accidentally uploaded the wrong after screenshots. This issue had already been fixed but I uploaded the wrong after screenshots and to fix I have updated the correct screenshot of after semantics in the description of PR, PTAL.

Referring the same over here!


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix content navigation order in semantics when links present

2 participants