Repository navigation
Fix Orca flat review in Linux accessibility - #196338
Conversation
Flutter content was reported to screen readers as not visible and without a position on screen, and the accessibility tree couldn't be navigated from the Flutter content back up to the window. This enables: - Orca flat review of Flutter content. - Screen readers to find Flutter content by its location on screen. - Navigating from Flutter content to the containing window. Fixes flutter#188022
There was a problem hiding this comment.
Code Review
This pull request modifies the Linux platform accessibility implementation to handle AtkSocket and AtkPlug interactions in-process, avoiding blocking D-Bus calls by overriding state retrieval and implementing AtkComponent extents methods directly. Unit tests have been added to verify these changes. The review feedback highlights critical null-pointer dereference risks: first, in fl_view_accessible_get_extents where output pointers (x, y, width, height) may be dereferenced without null checks; second, in fl_atk_socket_ref_state_set where returned state sets could be null; and third, in fl_socket_accessible_embed where the plug argument should be validated before use.
|
I have tested this and it works. It doesn't seem to announce that text is a header from my testing though. |
|
@paul-geoghegan it looks like we don't set the header levels, but we do set the heading role (I'll make a separate PR). This is only relates to flat review right? Has this worked on any Linux embedder? This might be worth tackling separately. |
|
Made #196758 with heading/header fixes. This might be the cause of the problem. |
|
I tested the |
mattkae
left a comment
There was a problem hiding this comment.
Some minor nits about test naming
|
Yes, #183660 is the issue I tested. |
The branch was rebased onto master (ac8f87e, 56 commits after the last base, 752015c). The replay changed none of its 631 commits (their patch ids are the old chain's), and a merge of the same master into the old head had no conflict in the text. The commits below this one keep the lock file and the generated files of the old base. This commit adds what master's 56 commits need. Its tree is the tree of that merge with the files below. In it: - deps.lock.bzl for master's DEPS: the Skia and Dart rolls, and the Dart SDK's own dependencies. pub.lock.bzl does not change. - The converter's output for the two test sources master added: impeller/renderer/backend/vulkan/BUILD.bazel (pipeline_cache_vk_unittests.cc) and shell/platform/linux/BUILD.bazel (fl_socket_accessible_test.cc). The new Dart test files (web_ui, the framework) are picked up by globs. - The port of flutter#196451 ("[Linux] Hide libunwind symbols in libflutter_linux_gtk.so") to the two hand-written files that mirror the GN it changed: - toolchains/cc_toolchain_config.bzl: a Linux link passes -Wl,--exclude-libs,libunwind.a next to --unwindlib=libunwind (//build/config/compiler:runtime_library under is_linux; Android's links have their own list, without an unwinder flag). - build_defs/testing/native_symbols.bzl: the symbol check passes --forbid-exported-unwind-symbols for a library built for Linux (check_forbidden_native_symbols.gni under is_linux), so the checks of libflutter_linux_gtk.so and of the embedder's libflutter_engine.so fail on an exported unwinder symbol, as GN's do. - One conflict the text did not show, in GN itself: shell/platform/linux/BUILD.gn lists fl_socket_accessible.h in `public` now. Upstream's new fl_socket_accessible_test.cc (flutter#196338) includes it; upstream lists the header nowhere, and the branch ("[gn] The Linux shell's unlisted headers join its lists") had put it among the private sources, so `gn gen --check`, which every tools/gn run is, failed on the merged tree: "Including a private header". Under Bazel the header would have been a private one of the library too, outside the inputs of the test's compile (not tried). No gate of mine ran GN's check; a tools/gn run for the flag comparison found it, and the gates run tools/gn for a host build from now on. shell/platform/linux's BUILD.bazel is regenerated with it. Checked, on this tree with the two commits that follow it (a tool test of master's that does not compile, and the Slimpeller change), which is the tree every check below ran on unless it says otherwise: - The converter: regenerated and --check on this tree itself and on the tree with the Slimpeller change (112 generated files current both times); on the latter its formatter, analyzer and suite (315 tests). - GN's own check (tools/gn) for a host debug build, a host release build and an Android release build on Linux, and for the Mac host build and the iOS device build on a Mac. - check_build_configs.sh, check_generated_bazel_files.sh, bazel_ci_test.py (35), engine_build_configs (84), bazel_tools (62), buildifier, tools/gn_test.py (7), ci/pylint.sh, ci/format.sh (its Python step through yapf directly) and the analyzer over dev/bots: these ran before the GN fix and the test fix, and what the two touch ran again after them (the generated files' check, gn format, buildifier, the analyzer over flutter_tools, the test file). - The analyzer over flutter_tools, and the tool test files the branch touches (391 tests). - Bazel analysis on Linux: ci_host_debug, host_release_test, //:tool_tests //:dart_tests, and every Linux build under its own configuration (47). All 352 links of ci_host_debug's graph carry the new flag beside --unwindlib=libunwind (345 of them link shared libraries). The symbol checks pass the new argument where the library is built for Linux (the check of host_debug_desktop and the two of host_debug_unopt_impeller_tests: libflutter_linux_gtk.so, libflutter_engine.so) and not where it is Android's (the check of ci_android_release_arm64). - On a Mac (the tester's T109): the host build (316 targets) and its suite (315 of 315 tests), the iOS device build ci/ios_debug, and the iOS unit tests on the simulator. Not run: anything built or linked under Bazel on Linux (analysis only), so the new link flag and the new symbol check have their first run on the bots; dev/bots' own tests (the 56 commits change no file under dev/bots).
flutter/flutter@98744d3...b75c5b3 2026-11-24 [email protected] Roll Skia from 89e364b13f05 to 2140958ee284 (3 revisions) (flutter/flutter#197287) 2026-11-24 [email protected] Roll Skia from f82f3efc0461 to 89e364b13f05 (6 revisions) (flutter/flutter#197284) 2026-11-24 [email protected] Roll Dart SDK from 10aef26c73f5 to 87f515c52de9 (1 revision) (flutter/flutter#197279) 2026-11-24 [email protected] iOS: Drive platform view tests through IOSExternalViewEmbedder (flutter/flutter#197263) 2026-11-24 [email protected] Fix null check crash in flushSemantics from a stale ancestor geometry cache (flutter/flutter#192724) 2026-11-24 [email protected] [Impeller] Fix Windows build with MSVC 14.52: std::modf is [[nodiscard]] (flutter/flutter#193413) 2026-11-24 [email protected] [web] Preserve fill rules from path operations (flutter/flutter#195971) 2026-11-24 [email protected] Regenerate tool_test_durations.json (flutter/flutter#197261) 2026-11-24 [email protected] Roll Skia from 694af434cadd to f82f3efc0461 (4 revisions) (flutter/flutter#197258) 2026-11-24 [email protected] Increase number of 'Linux tool_integration_tests' subshards (flutter/flutter#197262) 2026-11-24 [email protected] Run tool_integration_tests app tests in one subshard instead of all of them (flutter/flutter#197264) 2026-11-24 [email protected] [flutter_tools] Pass featureFlags in localizations_test.dart (flutter/flutter#197269) 2026-11-23 [email protected] Fix Orca flat review in Linux accessibility (flutter/flutter#196338) 2026-11-23 [email protected] [flutter tools] Pass --client-id=flutter-analyze to the analysis server (flutter/flutter#197227) 2026-11-23 [email protected] [Flutter GPU] Expose the maximum render target size (flutter/flutter#196640) 2026-11-23 [email protected] iOS: Don't clear raster thread state in platform views reset (flutter/flutter#197025) 2026-11-23 [email protected] iOS: Composite platform views from layers in tests (flutter/flutter#197021) 2026-11-23 [email protected] [flutter_tools] Harden extension diagnostics models and RPC failure handling (flutter/flutter#196233) 2026-11-23 [email protected] [flutter_tools] Support standalone UI packages in gen-l10n (flutter/flutter#194500) 2026-11-23 [email protected] [flutter_tools] Consolidate ToolDependencies.bootstrap builders and require extension managers (flutter/flutter#196388) 2026-11-23 [email protected] Roll Skia from 31b19bdc8195 to 694af434cadd (2 revisions) (flutter/flutter#197239) 2026-11-23 [email protected] Roll Dart SDK from df632229552e to 10aef26c73f5 (1 revision) (flutter/flutter#197234) 2026-11-23 [email protected] [macOS] Fix back buffer cache returning a wrong-size surface (Impeller null deref in Canvas::SetupRenderPass) (flutter/flutter#192522) 2026-11-23 [email protected] Add Settings::frame_built_callback for UI frame build timings (flutter/flutter#197213) If this roll has caused a breakage, revert this CL and set the roller to dry run mode using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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
The branch was rebased onto master (ac8f87e, 56 commits after the last base, 752015c). The replay changed none of its 631 commits (their patch ids are the old chain's), and a merge of the same master into the old head had no conflict in the text. The commits below this one keep the lock file and the generated files of the old base. This commit adds what master's 56 commits need. Its tree is the tree of that merge with the files below. In it: - deps.lock.bzl for master's DEPS: the Skia and Dart rolls, and the Dart SDK's own dependencies. pub.lock.bzl does not change. - The converter's output for the two test sources master added: impeller/renderer/backend/vulkan/BUILD.bazel (pipeline_cache_vk_unittests.cc) and shell/platform/linux/BUILD.bazel (fl_socket_accessible_test.cc). The new Dart test files (web_ui, the framework) are picked up by globs. - The port of flutter#196451 ("[Linux] Hide libunwind symbols in libflutter_linux_gtk.so") to the two hand-written files that mirror the GN it changed: - toolchains/cc_toolchain_config.bzl: a Linux link passes -Wl,--exclude-libs,libunwind.a next to --unwindlib=libunwind (//build/config/compiler:runtime_library under is_linux; Android's links have their own list, without an unwinder flag). - build_defs/testing/native_symbols.bzl: the symbol check passes --forbid-exported-unwind-symbols for a library built for Linux (check_forbidden_native_symbols.gni under is_linux), so the checks of libflutter_linux_gtk.so and of the embedder's libflutter_engine.so fail on an exported unwinder symbol, as GN's do. - One conflict the text did not show, in GN itself: shell/platform/linux/BUILD.gn lists fl_socket_accessible.h in `public` now. Upstream's new fl_socket_accessible_test.cc (flutter#196338) includes it; upstream lists the header nowhere, and the branch ("[gn] The Linux shell's unlisted headers join its lists") had put it among the private sources, so `gn gen --check`, which every tools/gn run is, failed on the merged tree: "Including a private header". Under Bazel the header would have been a private one of the library too, outside the inputs of the test's compile (not tried). No gate of mine ran GN's check; a tools/gn run for the flag comparison found it, and the gates run tools/gn for a host build from now on. shell/platform/linux's BUILD.bazel is regenerated with it. Checked, on this tree with the two commits that follow it (a tool test of master's that does not compile, and the Slimpeller change), which is the tree every check below ran on unless it says otherwise: - The converter: regenerated and --check on this tree itself and on the tree with the Slimpeller change (112 generated files current both times); on the latter its formatter, analyzer and suite (315 tests). - GN's own check (tools/gn) for a host debug build, a host release build and an Android release build on Linux, and for the Mac host build and the iOS device build on a Mac. - check_build_configs.sh, check_generated_bazel_files.sh, bazel_ci_test.py (35), engine_build_configs (84), bazel_tools (62), buildifier, tools/gn_test.py (7), ci/pylint.sh, ci/format.sh (its Python step through yapf directly) and the analyzer over dev/bots: these ran before the GN fix and the test fix, and what the two touch ran again after them (the generated files' check, gn format, buildifier, the analyzer over flutter_tools, the test file). - The analyzer over flutter_tools, and the tool test files the branch touches (391 tests). - Bazel analysis on Linux: ci_host_debug, host_release_test, //:tool_tests //:dart_tests, and every Linux build under its own configuration (47). All 352 links of ci_host_debug's graph carry the new flag beside --unwindlib=libunwind (345 of them link shared libraries). The symbol checks pass the new argument where the library is built for Linux (the check of host_debug_desktop and the two of host_debug_unopt_impeller_tests: libflutter_linux_gtk.so, libflutter_engine.so) and not where it is Android's (the check of ci_android_release_arm64). - On a Mac (the tester's T109): the host build (316 targets) and its suite (315 of 315 tests), the iOS device build ci/ios_debug, and the iOS unit tests on the simulator. Not run: anything built or linked under Bazel on Linux (analysis only), so the new link flag and the new symbol check have their first run on the bots; dev/bots' own tests (the 56 commits change no file under dev/bots).
Flutter content was reported to screen readers as not visible and without a position on screen, and the accessibility tree couldn't be navigated from the Flutter content back up to the window.
This enables:
Switch).Fixes #188022
Fixes #183660