Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1523)

Unified Diff: Source/modules/accessibility/AXRenderObject.cpp

Issue 856473002: Inherit Presentation role only when elements without a explicit role defined. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/accessibility/AXRenderObject.cpp
diff --git a/Source/modules/accessibility/AXRenderObject.cpp b/Source/modules/accessibility/AXRenderObject.cpp
index 36cac22763c6e9ebd1dcfefb04cd21c80a494b5c..1073f3a48ee57698f69f2e011e07702122fd4964 100644
--- a/Source/modules/accessibility/AXRenderObject.cpp
+++ b/Source/modules/accessibility/AXRenderObject.cpp
@@ -2366,8 +2366,11 @@ bool AXRenderObject::inheritsPresentationalRole() const
return false;
QualifiedName tagName = toElement(elementNode)->tagQName();
- if (tagName == ulTag || tagName == olTag || tagName == dlTag)
- return (parent->roleValue() == NoneRole || parent->roleValue() == PresentationalRole);
+ if (tagName != ulTag && tagName != olTag && tagName != dlTag)
+ return false;
+
+ if (parent->roleValue() == NoneRole || parent->roleValue() == PresentationalRole)
+ return ariaRoleAttribute() == UnknownRole;
return false;
}

Powered by Google App Engine
This is Rietveld 408576698