Commit b9be8cb0 authored by Lucas Radaelli's avatar Lucas Radaelli Committed by Commit Bot

[fuchsia][a11y] Fuchsia hidden nodes are ignored AxNodes.

This change fixes a bug where an invisible AxNode was being remapped to
a hidden Fuchsia node, where an ignored AxNode actually matches the
expected behavior.

Documentation for invisible:
https://chromium.googlesource.com/chromium/src/+/lkgr/docs/accessibility/offscreen.md

Test: AXTreeConverterTest.*
Bug: 1135817,fuchsia:60693
Change-Id: Ice78a489a16d4edd357a9181d7bf3d23a32ffb28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2454092Reviewed-by: default avatarSharon Yang <yangsharon@chromium.org>
Reviewed-by: default avatarSergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Lucas Radaelli <lucasradaelli@google.com>
Cr-Commit-Position: refs/heads/master@{#814514}
parent 7c1f80de
......@@ -116,7 +116,7 @@ fuchsia::accessibility::semantics::States ConvertStates(
}
// Indicates if the node is hidden.
states.set_hidden(node.HasState(ax::mojom::State::kInvisible));
states.set_hidden(node.IsIgnored());
// The user entered value of the node, if applicable.
if (node.HasStringAttribute(ax::mojom::StringAttribute::kValue)) {
......
......@@ -98,7 +98,7 @@ TEST_F(AXTreeConverterTest, AllFieldsSetAndEqual) {
std::vector<int32_t>{kChildId1, kChildId2, kChildId3}, relative_bounds,
kLabel1, kDescription1, ax::mojom::CheckedState::kMixed);
source_node_data.AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, false);
source_node_data.RemoveState(ax::mojom::State::kInvisible);
source_node_data.RemoveState(ax::mojom::State::kIgnored);
auto converted_node = AXNodeDataToSemanticNode(source_node_data);
EXPECT_EQ(static_cast<uint32_t>(source_node_data.id),
converted_node.node_id());
......
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