-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[url_launcher] fix: tab traversal on web #10020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[url_launcher] fix: tab traversal on web #10020
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request fixes an accessibility issue in url_launcher_web
where the Link
widget created duplicate semantic nodes. The change wraps the existing Semantics
widget in _buildChild
with a MergeSemantics
widget to combine the semantic information of the link and its child. A new integration test has been added to verify that a MergeSemantics
widget is present in the widget tree for a WebLinkDelegate
. The package version has been bumped to 2.4.2
and the CHANGELOG.md
has been updated to reflect this fix. My review includes a suggestion to align the new changelog entry with the repository's style guide.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…ix/tab_traversal_on_web
hasEnabledState: true, | ||
hasFocusAction: true, | ||
isEnabled: true, | ||
isButton: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chunhtai I was expecting this test to fail as the engine fix landed already 🤔
I mean now that the engine prioritize link, then ideally this test don't need isButton: true
right? Are the tests not being ran against the master branch of the flutter?
return MergeSemantics( | ||
child: Semantics( | ||
link: true, | ||
identifier: _semanticsIdentifier, | ||
linkUrl: widget.link.uri, | ||
child: widget.link.builder( | ||
context, | ||
widget.link.isDisabled ? null : _followLink, | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think tests run against master AND stable (@stuartmorgan-g to confirm).
If this code is expected to work with master but not with stable, then you need to wait until your flutter fix makes it to stable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most tests (including web integration tests) are run against master and stable, yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it should be fine now since all tests are passing
If a test that you expected to fail is passing, that doesn't sound fine; it sounds like there's a potential test issue here that should be investigated. Am I misunderstanding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading the previous (reverted) PR:
With
MergeSemantics
, the semantics tree was not generated properly, e.glinkUrl
value gets removed from the final semantics tree. This is being fixed in the engine, see flutter/flutter#174473
That sounds like we need to wait until the engine fix lands in stable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I misunderstanding?
I would say no, but, I'm only 50% sure about my statement and that is why I am looking for @chunhtai 's feedback as he has way more knowledge on this.
But yes, from my understanding, that test should fail as my engine fix now prioritize the link flag over the button one, meaning isButton: true
should make it fail.
Anyway, will wait for the fix to land on stable and then, expectt the test to fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, will wait for the fix to land on stable and then, expectt the test to fail
The test passed CI on master, pinned to 8d0b31d81a02d13ee37d17c9387d7bbcd1c2baba
(which is yesterday), so it's not clear to me what reason there would be to expect different results when the current master reaches stable.
Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
Continuation of #9815
Fixes flutter/flutter#157689
Pre-Review Checklist
[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assist
bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3