| Index: content/browser/accessibility/browser_accessibility_android.cc
|
| diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc
|
| index fd0bab70144f0a8f95c61b7533cc33c9d88387a2..499c2a2c31c52f773988fcb74974f1314de609f8 100644
|
| --- a/content/browser/accessibility/browser_accessibility_android.cc
|
| +++ b/content/browser/accessibility/browser_accessibility_android.cc
|
| @@ -105,10 +105,6 @@ bool BrowserAccessibilityAndroid::PlatformIsLeaf() const {
|
| return false;
|
| }
|
|
|
| - // If it has a focusable child, we definitely can't leave out children.
|
| - if (HasFocusableChild())
|
| - return false;
|
| -
|
| // Date and time controls should drop their children.
|
| switch (GetRole()) {
|
| case ui::AX_ROLE_DATE:
|
| @@ -119,6 +115,10 @@ bool BrowserAccessibilityAndroid::PlatformIsLeaf() const {
|
| break;
|
| }
|
|
|
| + // If it has a focusable child, we definitely can't leave out children.
|
| + if (HasFocusableNonOptionChild())
|
| + return false;
|
| +
|
| BrowserAccessibilityManagerAndroid* manager_android =
|
| static_cast<BrowserAccessibilityManagerAndroid*>(manager());
|
| if (manager_android->prune_tree_for_screen_reader()) {
|
| @@ -1332,14 +1332,16 @@ void BrowserAccessibilityAndroid::GetWordBoundaries(
|
| }
|
| }
|
|
|
| -bool BrowserAccessibilityAndroid::HasFocusableChild() const {
|
| +bool BrowserAccessibilityAndroid::HasFocusableNonOptionChild() const {
|
| // This is called from PlatformIsLeaf, so don't call PlatformChildCount
|
| // from within this!
|
| for (uint32_t i = 0; i < InternalChildCount(); i++) {
|
| BrowserAccessibility* child = InternalGetChild(i);
|
| - if (child->HasState(ui::AX_STATE_FOCUSABLE))
|
| + if (child->HasState(ui::AX_STATE_FOCUSABLE) &&
|
| + child->GetRole() != ui::AX_ROLE_MENU_LIST_OPTION)
|
| return true;
|
| - if (static_cast<BrowserAccessibilityAndroid*>(child)->HasFocusableChild())
|
| + if (static_cast<BrowserAccessibilityAndroid*>(child)
|
| + ->HasFocusableNonOptionChild())
|
| return true;
|
| }
|
| return false;
|
|
|