Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
06d560d
base
pedromassango May 20, 2025
fad6f19
Merge branch 'flutter:main' into master
pedromassango Aug 15, 2025
11e7825
fix: Link widget Tab traversal
pedromassango Aug 15, 2025
68ec601
wip
pedromassango Aug 15, 2025
0b2497c
wip
pedromassango Aug 15, 2025
dc9fec1
wip
pedromassango Aug 15, 2025
d8e410d
Merge branch 'flutter:main' into fix/link_tab_traversal
pedromassango Aug 26, 2025
5f2cb62
wip
pedromassango Aug 26, 2025
a376b78
nit
pedromassango Aug 26, 2025
4ac086d
nit
pedromassango Aug 26, 2025
a9b517e
update CHANGELOG.md
pedromassango Aug 28, 2025
26c49e0
Merge branch 'main' into fix/link_tab_traversal
pedromassango Aug 28, 2025
e1222f1
Merge branch 'main' into fix/link_tab_traversal
pedromassango Sep 4, 2025
abaaa01
nit
pedromassango Sep 4, 2025
30d7a0d
Merge branch 'main' into fix/tab_traversal_on_web
pedromassango Sep 16, 2025
c724783
Update packages/url_launcher/url_launcher_web/CHANGELOG.md
pedromassango Sep 16, 2025
1eb4b60
Merge branch 'flutter:main' into master
pedromassango Sep 16, 2025
30c0c73
update test case
pedromassango Sep 16, 2025
7b3465a
update existing test cases
pedromassango Sep 16, 2025
beb1acf
wip
pedromassango Sep 16, 2025
8d6d054
Merge branch 'main' into fix/tab_traversal_on_web
pedromassango Sep 16, 2025
7aa4726
fix: format
pedromassango Sep 16, 2025
cd430f5
Merge remote-tracking branch 'origin/fix/tab_traversal_on_web' into f…
pedromassango Sep 16, 2025
a5b59bf
Merge branch 'main' into fix/tab_traversal_on_web
pedromassango Oct 19, 2025
0be70b6
Merge branch 'master' into fix/tab_traversal_on_web
pedromassango Jan 12, 2026
e392c64
Apply suggestion from @chunhtai
pedromassango Jan 12, 2026
a41b058
bump min required flutter
pedromassango Jan 12, 2026
ed0954b
Merge remote-tracking branch 'origin/fix/tab_traversal_on_web' into f…
pedromassango Jan 12, 2026
d005ab6
Merge remote-tracking branch 'base/main' into fix/tab_traversal_on_web
pedromassango Jan 12, 2026
be15166
nit: revert
pedromassango Jan 14, 2026
abac0ad
nit: revert
pedromassango Jan 14, 2026
6f7565d
fix
pedromassango Jan 14, 2026
ae2d09f
fix
pedromassango Jan 14, 2026
6f12d79
wip
pedromassango Jan 14, 2026
9c33f52
Merge branch 'main' into fix/tab_traversal_on_web
pedromassango Jan 14, 2026
128949a
wip
pedromassango Jan 15, 2026
a892450
wip
pedromassango Jan 15, 2026
8018211
Merge branch 'main' into fix/tab_traversal_on_web
pedromassango Jan 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/url_launcher/url_launcher_web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 2.4.2

* Fixes an issue that caused duplicate semantic nodes for `Link` widgets.
* Updates minimum supported SDK version to Flutter 3.32/Dart 3.8.

## 2.4.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,43 @@ void main() {
maxScrolls: 1000,
);
});

testWidgets('MergeSemantics is always present to avoid duplicate nodes', (
WidgetTester tester,
) async {
await tester.pumpWidget(
MaterialApp(
home: Scaffold(
body: Column(
children: <Widget>[
WebLinkDelegate(
TestLinkInfo(
uri: Uri.parse('https://dart.dev/xyz'),
target: LinkTarget.blank,
builder: (BuildContext context, FollowLink? followLink) {
return ElevatedButton(
onPressed: followLink,
child: const Text('First Button'),
);
},
),
),
],
),
),
),
);

await tester.pumpAndSettle();

final Finder buttonFinder = find.byType(ElevatedButton);
expect(buttonFinder, findsOneWidget);

final Element buttonElement = tester.element(buttonFinder);
final MergeSemantics? parentWidget = buttonElement
.findAncestorWidgetOfExactType<MergeSemantics>();
expect(parentWidget, isNotNull);
});
});

group('Follows links', () {
Expand Down Expand Up @@ -895,17 +932,13 @@ void main() {
isLink: true,
identifier: 'test-link-12',
// linkUrl: 'https://foobar/example?q=1',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not introduced in this pr, do you know why the semantics node didn't set the link Url? it feels like it should

@pedromassango pedromassango Jan 13, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I have no idea, it looks like the dev was missing the fix I am trying to land here in order for the test to pass with this line uncommented 🤔 I would need more time to trace it tho and have a proper answer

@pedromassango pedromassango Jan 13, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or... it was missing the engine fix I landed last year (as part of this PR), see this comment: https://github.com/flutter/flutter/pull/174473/changes#r2307776968 or your reasoning behind that fix here

children: <Matcher>[
matchesSemantics(
hasTapAction: true,
hasEnabledState: true,
hasFocusAction: true,
isEnabled: true,
isButton: true,
isFocusable: true,
label: 'Button Link Text',
),
],
hasTapAction: true,
hasEnabledState: true,
hasFocusAction: true,
isEnabled: true,
isButton: true,
Comment thread
pedromassango marked this conversation as resolved.
isFocusable: true,
label: 'Button Link Text',
),
);

Expand Down Expand Up @@ -941,7 +974,9 @@ void main() {
final Finder linkFinder = find.byKey(linkKey);
expect(
tester.getSemantics(
find.descendant(of: linkFinder, matching: find.byType(Semantics)),
find
.descendant(of: linkFinder, matching: find.byType(Semantics))
.first,
),
matchesSemantics(
isLink: true,
Expand Down
4 changes: 2 additions & 2 deletions packages/url_launcher/url_launcher_web/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: regular_integration_tests
publish_to: none

environment:
sdk: ^3.8.0
flutter: ">=3.32.0"
sdk: ^3.10.0
flutter: ">=3.38.0"

dependencies:
flutter:
Expand Down
16 changes: 9 additions & 7 deletions packages/url_launcher/url_launcher_web/lib/src/link.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,15 @@ class WebLinkDelegateState extends State<WebLinkDelegate> {
}

Widget _buildChild(BuildContext context) {
return Semantics(
link: true,
identifier: _semanticsIdentifier,
linkUrl: widget.link.uri,
child: widget.link.builder(
context,
widget.link.isDisabled ? null : _followLink,
return MergeSemantics(
child: Semantics(
link: true,
identifier: _semanticsIdentifier,
linkUrl: widget.link.uri,
child: widget.link.builder(
context,
widget.link.isDisabled ? null : _followLink,
),
Comment thread
pedromassango marked this conversation as resolved.
),
);
}
Expand Down
6 changes: 3 additions & 3 deletions packages/url_launcher/url_launcher_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: url_launcher_web
description: Web platform implementation of url_launcher
repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_web
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22
version: 2.4.1
version: 2.4.2

environment:
sdk: ^3.8.0
flutter: ">=3.32.0"
sdk: ^3.10.0
flutter: ">=3.38.0"

flutter:
plugin:
Expand Down
Loading