Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@goderbauer
Copy link
Member

@goderbauer goderbauer commented Apr 19, 2018

This is in preparation for implicit a11y scrolling on iOS (flutter/flutter#11983).

On Android, hidden elements are dropped on the floor. The OS never learns about them.
On iOS, hidden elements are exposed to the OS, but they don't have an accessibilityFrame and therefore cannot be focused with touch. The only way to focus them is via linear navigation. If they gain focus, the framework is asked to bring the hidden element on screen.

Framework wiring in flutter/flutter#16772.

/// non-empty label. The [namesRoute] and [scopesRoute] flags may be on the
/// same node. The label of the found node will be announced as an edge
/// transition. If no non-empty, non-null label is found then:
///
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for removing all of the EOL whitespace!

return false;
return [self node].flags != 0 || ![self node].label.empty() || ![self node].value.empty() ||
![self node].hint.empty() ||
return ([self node].flags != 0 && [self node].flags != static_cast<int32_t>(blink::SemanticsFlags::kIsHidden)) ||
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't .flags a bitfield? If so, shouldn't you be checking ![self node].HasFlag(blink::SemanticsFlags::kIsHidden) instead of checking for inequality?

Copy link
Member Author

Choose a reason for hiding this comment

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

I want to check if it only has the hidden flag. If it has no flags or if it only has the hidden flag the SemanticsObject is not a (a11y focusable) accessibilityElement.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK.

@gspencergoog
Copy link
Contributor

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@goderbauer goderbauer merged commit 995633e into flutter:master Apr 20, 2018
@goderbauer goderbauer deleted the ios-scroll-prep branch April 20, 2018 17:37
@aam
Copy link
Member

aam commented Apr 20, 2018

I believe this has broken Linux and Mac engine buildbots https://build.chromium.org/p/client.flutter/console:

[24/75] ACTION //flutter/shell/platform/android:flutter_shell_java__compile_java__javac(//build/toolchain/android:clang_arm)
FAILED: gen/flutter/shell/platform/android/flutter_shell_java__compile_java__javac.d gen/flutter/shell/platform/android/flutter_shell_java__compile_java.initial.jar gen/flutter/shell/platform/android/flutter_shell_java__compile_java.initial.jar.md5.stamp 
python ../../build/android/gyp/javac.py --depfile=gen/flutter/shell/platform/android/flutter_shell_java__compile_java__javac.d --classpath=\[\] --classpath=@FileArg\(gen/flutter/shell/platform/android/flutter_shell_java.build_config:javac:classpath\) --jar-path=gen/flutter/shell/platform/android/flutter_shell_java__compile_java.initial.jar --java-srcjars=\[\] --java-srcjars=@FileArg\(gen/flutter/shell/platform/android/flutter_shell_java.build_config:javac:srcjars\) --jar-excluded-classes=\[\] --bootclasspath=../../third_party/android_tools/sdk/platforms/android-22/android.jar --chromium-code=1 ../../flutter/shell/platform/android/io/flutter/app/FlutterActivity.java ../../flutter/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java ../../flutter/shell/platform/android/io/flutter/app/FlutterActivityEvents.java ../../flutter/shell/platform/android/io/flutter/app/FlutterApplication.java ../../flutter/shell/platform/android/io/flutter/app/FlutterFragmentActivity.java ../../flutter/shell/platform/android/io/flutter/app/FlutterPluginRegistry.java ../../flutter/shell/platform/android/io/flutter/plugin/common/ActivityLifecycleListener.java ../../flutter/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java ../../flutter/shell/platform/android/io/flutter/plugin/common/BinaryCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/common/BinaryMessenger.java ../../flutter/shell/platform/android/io/flutter/plugin/common/FlutterException.java ../../flutter/shell/platform/android/io/flutter/plugin/common/EventChannel.java ../../flutter/shell/platform/android/io/flutter/plugin/common/JSONMessageCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/common/JSONMethodCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/common/JSONUtil.java ../../flutter/shell/platform/android/io/flutter/plugin/common/MessageCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/common/MethodCall.java ../../flutter/shell/platform/android/io/flutter/plugin/common/MethodChannel.java ../../flutter/shell/platform/android/io/flutter/plugin/common/MethodCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java ../../flutter/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/common/StandardMethodCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/common/StringCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/editing/InputConnectionAdaptor.java ../../flutter/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java ../../flutter/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java ../../flutter/shell/platform/android/io/flutter/util/PathUtils.java ../../flutter/shell/platform/android/io/flutter/util/Preconditions.java ../../flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java ../../flutter/shell/platform/android/io/flutter/view/FlutterMain.java ../../flutter/shell/platform/android/io/flutter/view/FlutterNativeView.java ../../flutter/shell/platform/android/io/flutter/view/FlutterView.java ../../flutter/shell/platform/android/io/flutter/view/ResourceCleaner.java ../../flutter/shell/platform/android/io/flutter/view/ResourceExtractor.java ../../flutter/shell/platform/android/io/flutter/view/ResourcePaths.java ../../flutter/shell/platform/android/io/flutter/view/TextureRegistry.java ../../flutter/shell/platform/android/io/flutter/view/VsyncWaiter.java
Traceback (most recent call last):
  File "../../build/android/gyp/javac.py", line 319, in <module>
    sys.exit(main(sys.argv[1:]))
  File "../../build/android/gyp/javac.py", line 283, in main
    java_files)
  File "../../build/android/gyp/javac.py", line 127, in DoJavac
    input_strings=javac_cmd)
  File "/b/build/slave/Linux_Engine/build/src/build/android/gyp/util/md5_check.py", line 30, in CallAndRecordIfStale
    function()
  File "../../build/android/gyp/javac.py", line 120, in Compile
    stderr_filter=ColorJavacOutput)
  File "/b/build/slave/Linux_Engine/build/src/build/android/gyp/util/build_utils.py", line 158, in CheckOutput
    raise CalledProcessError(cwd, args, stdout + stderr)
util.build_utils.CalledProcessError: Command failed: ( cd /b/build/slave/Linux_Engine/build/src/out/android_release_vulkan; javac -g -encoding UTF-8 -classpath gen/flutter/shell/platform/android/android_support_v4.jar -d /tmp/tmpP4INgZ/classes -bootclasspath ../../third_party/android_tools/sdk/platforms/android-22/android.jar -source 1.7 -target 1.7 -Xlint:unchecked ../../flutter/shell/platform/android/io/flutter/app/FlutterActivity.java ../../flutter/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java ../../flutter/shell/platform/android/io/flutter/app/FlutterActivityEvents.java ../../flutter/shell/platform/android/io/flutter/app/FlutterApplication.java ../../flutter/shell/platform/android/io/flutter/app/FlutterFragmentActivity.java ../../flutter/shell/platform/android/io/flutter/app/FlutterPluginRegistry.java ../../flutter/shell/platform/android/io/flutter/plugin/common/ActivityLifecycleListener.java ../../flutter/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java ../../flutter/shell/platform/android/io/flutter/plugin/common/BinaryCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/common/BinaryMessenger.java ../../flutter/shell/platform/android/io/flutter/plugin/common/FlutterException.java ../../flutter/shell/platform/android/io/flutter/plugin/common/EventChannel.java ../../flutter/shell/platform/android/io/flutter/plugin/common/JSONMessageCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/common/JSONMethodCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/common/JSONUtil.java ../../flutter/shell/platform/android/io/flutter/plugin/common/MessageCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/common/MethodCall.java ../../flutter/shell/platform/android/io/flutter/plugin/common/MethodChannel.java ../../flutter/shell/platform/android/io/flutter/plugin/common/MethodCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java ../../flutter/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/common/StandardMethodCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/common/StringCodec.java ../../flutter/shell/platform/android/io/flutter/plugin/editing/InputConnectionAdaptor.java ../../flutter/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java ../../flutter/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java ../../flutter/shell/platform/android/io/flutter/util/PathUtils.java ../../flutter/shell/platform/android/io/flutter/util/Preconditions.java ../../flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java ../../flutter/shell/platform/android/io/flutter/view/FlutterMain.java ../../flutter/shell/platform/android/io/flutter/view/FlutterNativeView.java ../../flutter/shell/platform/android/io/flutter/view/FlutterView.java ../../flutter/shell/platform/android/io/flutter/view/ResourceCleaner.java ../../flutter/shell/platform/android/io/flutter/view/ResourceExtractor.java ../../flutter/shell/platform/android/io/flutter/view/ResourcePaths.java ../../flutter/shell/platform/android/io/flutter/view/TextureRegistry.java ../../flutter/shell/platform/android/io/flutter/view/VsyncWaiter.java )
../../flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:94: error: invalid method declaration; return type required
        IS_HIDDEN(1 << 13);
        ^
../../flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:94: error: illegal start of type
        IS_HIDDEN(1 << 13);
                  ^
../../flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:94: error: ')' expected
        IS_HIDDEN(1 << 13);
                   ^
...
100 errors

@jason-simmons
Copy link
Member

see #5059

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants