Commit 99de069a authored by Yuanyao Zhong's avatar Yuanyao Zhong Committed by Chromium LUCI CQ

[chromecast] Prevent ax::Role List with size zero.

Make sure a set the semantic's role as kList only when it has actionable
children. Otherwise it is just a GenericContainer.

Bug: b/178063833
Test: test on assistant device.
Change-Id: Ie309e7bd3b87907fea19dbd1896f886965c7752a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2643478Reviewed-by: default avatarRandy Rossi <rmrossi@chromium.org>
Commit-Queue: Yuanyao Zhong <yyzhong@google.com>
Cr-Commit-Position: refs/heads/master@{#845785}
parent fff0d5e9
......@@ -171,7 +171,9 @@ void FlutterSemanticsNodeWrapper::PopulateAXRole(
return;
}
if (node_ptr_->scroll_children() > 0) {
std::vector<FlutterSemanticsNodeWrapper*> actionable_children;
GetActionableChildren(&actionable_children);
if (node_ptr_->scroll_children() > 0 && actionable_children.size() > 0) {
out_data->role = ax::mojom::Role::kList;
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment