This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[web] switch to SemanticsAction.focus (attempt 3)#53689
Merged
auto-submit[bot] merged 2 commits intoflutter:mainfrom Jul 15, 2024
Merged
[web] switch to SemanticsAction.focus (attempt 3)#53689auto-submit[bot] merged 2 commits intoflutter:mainfrom
auto-submit[bot] merged 2 commits intoflutter:mainfrom
Conversation
|
This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again. |
eccf797 to
f3b8f0f
Compare
f10597f to
a887f2b
Compare
chunhtai
approved these changes
Jul 15, 2024
| } | ||
|
|
||
| target.element.removeEventListener('focus', target.domFocusListener); | ||
| target.element.removeEventListener('blur', target.domBlurListener); |
Contributor
There was a problem hiding this comment.
is it possible to tell the difference between framework request focus and user interacting dom focus by the Event object in the listener?
Contributor
Author
There was a problem hiding this comment.
I'm not aware of one for focus/blur events specifically. The closest thing available is the isTrusted property, but it only detects dispatchEvent, which is not enough. Clicks can be differentiated by looking at their screenX/Y properties (source), but focus/blur doesn't have coordinates.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 15, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 15, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 15, 2024
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Jul 15, 2024
flutter/engine@8440bbe...cd78d21 2024-07-15 skia-flutter-autoroll@skia.org Roll Skia from 559a46957250 to 476abcbc2e4d (4 revisions) (flutter/engine#53911) 2024-07-15 skia-flutter-autoroll@skia.org Roll Skia from fe05596a26ea to 559a46957250 (7 revisions) (flutter/engine#53909) 2024-07-15 yjbanov@google.com [web] switch to SemanticsAction.focus (attempt 3) (flutter/engine#53689) 2024-07-15 skia-flutter-autoroll@skia.org Roll Skia from a3c29413cdf0 to fe05596a26ea (1 revision) (flutter/engine#53907) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
TytaniumDev
pushed a commit
to TytaniumDev/flutter
that referenced
this pull request
Aug 7, 2024
…1783) flutter/engine@8440bbe...cd78d21 2024-07-15 skia-flutter-autoroll@skia.org Roll Skia from 559a46957250 to 476abcbc2e4d (4 revisions) (flutter/engine#53911) 2024-07-15 skia-flutter-autoroll@skia.org Roll Skia from fe05596a26ea to 559a46957250 (7 revisions) (flutter/engine#53909) 2024-07-15 yjbanov@google.com [web] switch to SemanticsAction.focus (attempt 3) (flutter/engine#53689) 2024-07-15 skia-flutter-autoroll@skia.org Roll Skia from a3c29413cdf0 to fe05596a26ea (1 revision) (flutter/engine#53907) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This relands #53679.
The difference from the previous attempt is in the last commit, which prevents synthetic focus requests from echoing back into the framework. That part broke too many tests in g3 and needs to be revisited.
Original description
Stop using
SemanticsAction.didGain/LoseAccessibilityFocuson the web, start usingSemanticsAction.focus. This is because on the web, a11y focus is not observable, only input focus is. SendingSemanticsAction.focuswill guarantee that the framework move focus to the respective widget. There currently is no "unfocus" signal, because it seems to be already covered: either another widget gains focus, or an HTML DOM element outside the Flutter view does, both of which have their respective signals already.More details in the discussion in the issue flutter/flutter#83809.
Fixes flutter/flutter#83809
Fixes flutter/flutter#148285
Fixes flutter/flutter#143337