Commit 1d0405c8 authored by aleventhal's avatar aleventhal Committed by Commit bot

Special case for Android list items no longer needed to remove name, because...

Special case for Android list items no longer needed to remove name, because list items are no longer name from contents.

BUG=None

Review-Url: https://codereview.chromium.org/2901003002
Cr-Commit-Position: refs/heads/master@{#473987}
parent 6ca5bedb
......@@ -344,18 +344,6 @@ base::string16 BrowserAccessibilityAndroid::GetText() const {
return base::string16();
}
// In accordance with ARIA, some elements use their contents as an
// accessibility name, so some elements will have the same name as their
// child. While most platforms expect this, it causes Android to speak the
// name twice. So in this case we should remove the name from the parent.
if (GetRole() == ui::AX_ROLE_LIST_ITEM &&
GetIntAttribute(ui::AX_ATTR_NAME_FROM) == ui::AX_NAME_FROM_CONTENTS) {
// This is an approximation of "PlatformChildCount() > 0" because we can't
// call PlatformChildCount from here.
if (InternalChildCount() > 0 && !HasOnlyTextChildren())
return base::string16();
}
// We can only expose one accessible name on Android,
// not 2 or 3 like on Windows or Mac.
......
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