Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions shell/platform/windows/flutter_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ bool FlutterWindow::OnBitmapSurfaceUpdated(const void* allocation,
}

gfx::NativeViewAccessible FlutterWindow::GetNativeViewAccessible() {
if (binding_handler_delegate_ == nullptr) {
return nullptr;
}

return binding_handler_delegate_->GetNativeViewAccessible();
}

Expand Down
9 changes: 9 additions & 0 deletions shell/platform/windows/flutter_window_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,15 @@ TEST(FlutterWindowTest, OnThemeChange) {
win32window.InjectWindowMessage(WM_THEMECHANGED, 0, 0);
}

// The window should return no root accessibility node if
// it isn't attached to a view.
// Regression test for https://github.com/flutter/flutter/issues/129791
TEST(FlutterWindowTest, AccessibilityNodeWithoutView) {
MockFlutterWindow win32window;

EXPECT_EQ(win32window.GetNativeViewAccessible(), nullptr);
}

TEST(FlutterWindowTest, InitialAccessibilityFeatures) {
MockFlutterWindow win32window;
MockWindowBindingHandlerDelegate delegate;
Expand Down