Index: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
diff --git a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
index 803370747873c15192e64a72b909aa4aea3faaa8..e621f714a43e0c01025cc20d210fe94cc938ccda 100644 |
--- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
+++ b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
@@ -292,20 +292,11 @@ AccessibilityRole AXLayoutObject::DetermineAccessibilityRole() { |
return aria_role_; |
AccessibilityRole role = NativeAccessibilityRoleIgnoringAria(); |
- if (role != kUnknownRole) |
- return role; |
- |
- // These are layout containers added by blink |
- if (layout_object_->IsLayoutBlockFlow()) |
- return kGenericContainerRole; |
- |
- // If the element does not have role, but it has ARIA attributes or is an |
- // in-page link target, accessibility should fallback to exposing it as a |
- // generic container. |
- if (IsInPageLinkTarget() || SupportsARIAAttributes()) |
- return kGenericContainerRole; |
- |
- return kUnknownRole; |
+ // Anything that needs to still be exposed but doesn't have a more specific |
+ // role should be considered a generic container. Examples are |
+ // layout blocks with no node, in-page link targets, and plain elements |
+ // such as a <span> with ARIA markup. |
+ return role == kUnknownRole ? kGenericContainerRole : role; |
} |
void AXLayoutObject::Init() { |