zulip-flutter icon indicating copy to clipboard operation
zulip-flutter copied to clipboard

semantics: Fix content navigation order in message content when links present

Open MritunjayTiwari14 opened this issue 4 weeks ago • 3 comments

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.

MritunjayTiwari14 avatar Nov 02 '25 12:11 MritunjayTiwari14