Repository: flutter
Issue: [A11y] Second link is inaccessible in RichText
Labels: framework,a: accessibility,has reproducible steps,P2,found in release: 3.24,team-accessibility,triaged-accessibility,found in release: 3.27

### Steps to reproduce

1. Create a RichText widget with multiple TextSpan or WidgetSpan elements, each representing a clickable link.
2. Wrap each link in a Semantics widget to ensure accessibility support.
3. Add GestureDetector to handle onTap events for each link.
4. Test using a screen reader (TalkBack on Android or VoiceOver on iOS).

### Expected results

Whole content should be readable in a single tap and each link should be clickable.

### Actual results

The screen reader only selects or announces the first link consistently.

The second link is often skipped or merged with surrounding text, making it inaccessible.



### Code sample

```dart
class RichTextWithLinks extends StatelessWidget {
  const RichTextWithLinks({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Rich Text Links'),
        ),
        body: Padding(
          padding: const EdgeInsets.all(16.0),
          child: MergeSemantics(
            child: RichText(
              text: TextSpan(
                style: const TextStyle(color: Colors.black, fontSize: 16.0),
                children: [
                  const TextSpan(
                    text:
                        'Android is a mobile operating system based on a modified version of the ',
                  ),
                  WidgetSpan(
                    alignment: PlaceholderAlignment.baseline,
                    baseline: TextBaseline.alphabetic,
                    child: Semantics(
                      label: 'Linux kernel',
                      button: true,
                      //link: true,
                      child: GestureDetector(
                        onTap: () {
                          print("Link 1 tapped!");
                        },
                        child: const Text(
                          'Linux kernel',
                          style: TextStyle(
                            color: Colors.blue,
                            decoration: TextDecoration.underline,
                          ),
                        ),
                      ),
                    ),
                  ),
                  const TextSpan(
                    text: ' and other ',
                  ),
                  WidgetSpan(
                    alignment: PlaceholderAlignment.baseline,
                    baseline: TextBaseline.alphabetic,
                    child: Semantics(
                      label: 'open-source',
                      button: true,
                      //link: true,
                      child: GestureDetector(
                        onTap: () {
                          print(" link 2 tapped!");
                        },
                        child: const Text(
                          'open-source',
                          style: TextStyle(
                            color: Colors.blue,
                            decoration: TextDecoration.underline,
                          ),
                        ),
                      ),
                    ),
                  ),
                  const TextSpan(
                    text: ' software.',
                  ),
                ],
              ),
            ),
          ),
        ),
      ),
    );
  }
}

```

### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[Paste your output here]
```

</details>