Do not set textField role from its class name
AccessibilityNodeInfoDataWrapper::PopulateAXRole assigns a Chrome role to each node, and the last logic to decide a role is using an Android class name. Some Android app disguise its class name to control what TalkBack announces. This is sometimes helpful, but may break ChromeVox navigation. Gmail has a header which ax tree looks like below: ++ textField [Search mail] ++++ button [Open navigation drawer] ++++ genericContainer [Compose] ++++ genericContainer [Open account menu] The root of this is assigned textField role from its className. Clicking the node opens the input field, so that role should not be textField. (Note that these four nodes are all clickable.) This change deletes EditText from the map of className to Chrome role. Even after changing this, as normal textFields have editable property, their role is populated correctly. Bug: b/150827734 Test: unit_tests --gtest_filter="AXTreeSourceArcTest.*" Test: manual. Open Gmail, and OpenSearchBar is correctly focused. Change-Id: I7d0f867ba842585d7c222b9f96edfd958e5ad90d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2104743Reviewed-by:Sara Kato <sarakato@chromium.org> Reviewed-by:
David Tseng <dtseng@chromium.org> Commit-Queue: Hiroki Sato <hirokisato@chromium.org> Cr-Commit-Position: refs/heads/master@{#751321}
Showing
Please register or sign in to comment