-
Notifications
You must be signed in to change notification settings - Fork 6k
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.
This PR seems correct. What it does is to make the current flutter view focusable (so it can retain the focus if needed), but inaccessible by keyboard. See tabindex
docs.
The only change I want to make is to rename the method a little bit, because all it seems to be doing is to modify the keyboard reachability of the view, but the name is more generic than what it actually does. |
I'm taking a quick stab at attaching the focus handlers to the flutter view root, rather than the body. |
Looks like I broke something in Safari with my latest changes, reviewing: |
lib/web_ui/lib/src/engine/platform_dispatcher/view_focus_binding.dart
Outdated
Show resolved
Hide resolved
lib/web_ui/lib/src/engine/platform_dispatcher/view_focus_binding.dart
Outdated
Show resolved
Hide resolved
@@ -68,28 +68,6 @@ void testMain() { | |||
expect(view2.dom.rootElement.getAttribute('tabindex'), '0'); | |||
}); | |||
|
|||
test('never marks the views as focusable with semantincs enabled', () async { |
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.
Should we also add some tests? :)
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.
Well, there's tests already (this file is just showing the removed test, but there's others to verify the rest of the functionality!)
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.
One last update and applying autosubmit. |
auto label is removed for flutter/engine/54985, due to - The status or check suite Linux mac_android_aot_engine has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Come on, autosubmit, throw me a bone here! |
…159111) flutter/engine@878f593...7643ef1 2024-11-18 [email protected] iOS: Eliminate unguarded-availability opt-out (flutter/engine#56689) 2024-11-18 [email protected] [skwasm] Use `displayWidth`/`displayHeight` instead of `codedWidth`/`codedHeight` (flutter/engine#56686) 2024-11-18 [email protected] Extract TestGLContext to separate translation unit (flutter/engine#56647) 2024-11-18 [email protected] Roll Skia from b79e71223284 to 492e8347d7a4 (2 revisions) (flutter/engine#56687) 2024-11-18 [email protected] Update the Skia build scripts for a refactoring of the Fontconfig font manager (flutter/engine#56684) 2024-11-18 [email protected] iOS,macOS: Enable ARC in flutter_cflags_objc[c] (flutter/engine#56685) 2024-11-18 [email protected] Re-land "Remove `android_jit_release_x86`." (flutter/engine#56681) 2024-11-18 [email protected] Roll Skia from 0d24bd3268ef to b79e71223284 (1 revision) (flutter/engine#56683) 2024-11-18 [email protected] Flutter views can gain focus (flutter/engine#54985) 2024-11-18 [email protected] Roll Skia from 0b74d5c3eb4f to 0d24bd3268ef (1 revision) (flutter/engine#56680) 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 [email protected],[email protected] 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
…159113) flutter/engine@878f593...c9a965c 2024-11-18 [email protected] Roll Dart SDK from 625e0a9cb67a to 05d58364e92f (1 revision) (flutter/engine#56688) 2024-11-18 [email protected] iOS: Eliminate unguarded-availability opt-out (flutter/engine#56689) 2024-11-18 [email protected] [skwasm] Use `displayWidth`/`displayHeight` instead of `codedWidth`/`codedHeight` (flutter/engine#56686) 2024-11-18 [email protected] Extract TestGLContext to separate translation unit (flutter/engine#56647) 2024-11-18 [email protected] Roll Skia from b79e71223284 to 492e8347d7a4 (2 revisions) (flutter/engine#56687) 2024-11-18 [email protected] Update the Skia build scripts for a refactoring of the Fontconfig font manager (flutter/engine#56684) 2024-11-18 [email protected] iOS,macOS: Enable ARC in flutter_cflags_objc[c] (flutter/engine#56685) 2024-11-18 [email protected] Re-land "Remove `android_jit_release_x86`." (flutter/engine#56681) 2024-11-18 [email protected] Roll Skia from 0d24bd3268ef to b79e71223284 (1 revision) (flutter/engine#56683) 2024-11-18 [email protected] Flutter views can gain focus (flutter/engine#54985) 2024-11-18 [email protected] Roll Skia from 0b74d5c3eb4f to 0d24bd3268ef (1 revision) (flutter/engine#56680) 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 [email protected],[email protected] 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
…159116) flutter/engine@878f593...10dc07b 2024-11-18 [email protected] Update emulator definitions version to latest available from chrome infra (flutter/engine#56313) 2024-11-18 [email protected] Roll Dart SDK from 625e0a9cb67a to 05d58364e92f (1 revision) (flutter/engine#56688) 2024-11-18 [email protected] iOS: Eliminate unguarded-availability opt-out (flutter/engine#56689) 2024-11-18 [email protected] [skwasm] Use `displayWidth`/`displayHeight` instead of `codedWidth`/`codedHeight` (flutter/engine#56686) 2024-11-18 [email protected] Extract TestGLContext to separate translation unit (flutter/engine#56647) 2024-11-18 [email protected] Roll Skia from b79e71223284 to 492e8347d7a4 (2 revisions) (flutter/engine#56687) 2024-11-18 [email protected] Update the Skia build scripts for a refactoring of the Fontconfig font manager (flutter/engine#56684) 2024-11-18 [email protected] iOS,macOS: Enable ARC in flutter_cflags_objc[c] (flutter/engine#56685) 2024-11-18 [email protected] Re-land "Remove `android_jit_release_x86`." (flutter/engine#56681) 2024-11-18 [email protected] Roll Skia from 0d24bd3268ef to b79e71223284 (1 revision) (flutter/engine#56683) 2024-11-18 [email protected] Flutter views can gain focus (flutter/engine#54985) 2024-11-18 [email protected] Roll Skia from 0b74d5c3eb4f to 0d24bd3268ef (1 revision) (flutter/engine#56680) 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 [email protected],[email protected] 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
…159118) flutter/engine@878f593...c1b0e18 2024-11-19 [email protected] [Impeller] use sync fence for image uploads. (flutter/engine#56609) 2024-11-18 [email protected] Update emulator definitions version to latest available from chrome infra (flutter/engine#56313) 2024-11-18 [email protected] Roll Dart SDK from 625e0a9cb67a to 05d58364e92f (1 revision) (flutter/engine#56688) 2024-11-18 [email protected] iOS: Eliminate unguarded-availability opt-out (flutter/engine#56689) 2024-11-18 [email protected] [skwasm] Use `displayWidth`/`displayHeight` instead of `codedWidth`/`codedHeight` (flutter/engine#56686) 2024-11-18 [email protected] Extract TestGLContext to separate translation unit (flutter/engine#56647) 2024-11-18 [email protected] Roll Skia from b79e71223284 to 492e8347d7a4 (2 revisions) (flutter/engine#56687) 2024-11-18 [email protected] Update the Skia build scripts for a refactoring of the Fontconfig font manager (flutter/engine#56684) 2024-11-18 [email protected] iOS,macOS: Enable ARC in flutter_cflags_objc[c] (flutter/engine#56685) 2024-11-18 [email protected] Re-land "Remove `android_jit_release_x86`." (flutter/engine#56681) 2024-11-18 [email protected] Roll Skia from 0d24bd3268ef to b79e71223284 (1 revision) (flutter/engine#56683) 2024-11-18 [email protected] Flutter views can gain focus (flutter/engine#54985) 2024-11-18 [email protected] Roll Skia from 0b74d5c3eb4f to 0d24bd3268ef (1 revision) (flutter/engine#56680) 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 [email protected],[email protected] 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
I am unsure why the `tabindex` was removed when semantics were enabled. It seems this change was made without a clear explanation (by me). This PR shouldn't cause any issues as Flutter Views already have a tabindex, we're not adding a new one. This change is necessary because the semantics text strategy refocuses the view on deactivation, requiring the Flutter view to be focusable. ThIs PR is a requirement to enable flutter/engine#54966. flutter#153022 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
I am unsure why the
tabindex
was removed when semantics were enabled. It seems this change was made without a clear explanation (by me). This PR shouldn't cause any issues as Flutter Views already have a tabindex, we're not adding a new one. This change is necessary because the semantics text strategy refocuses the view on deactivation, requiring the Flutter view to be focusable.ThIs PR is a requirement to enable #54966.
flutter/flutter#153022
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.