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

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

Issue 515843002: Adds accessibility role for figure tag and handles its children as a group. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: added role for some case without renderer Created 6 years, 4 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
« no previous file with comments | « Source/core/accessibility/AXObject.h ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXRenderObject.cpp
diff --git a/Source/core/accessibility/AXRenderObject.cpp b/Source/core/accessibility/AXRenderObject.cpp
index a3106b22c7cba331614e7dc8e9cbf8efd4923b1f..91f691f745c6515f65f72c29547e31e6727520a4 100644
--- a/Source/core/accessibility/AXRenderObject.cpp
+++ b/Source/core/accessibility/AXRenderObject.cpp
@@ -388,6 +388,9 @@ AccessibilityRole AXRenderObject::determineAccessibilityRole()
if (isEmbeddedObject())
return EmbeddedObjectRole;
+ if (node && node->hasTagName(figureTag))
+ return FigureRole;
+
// There should only be one banner/contentInfo per page. If header/footer are being used within an article or section
// then it should not be exposed as whole page's banner/contentInfo
if (node && node->hasTagName(headerTag) && !isDescendantOfElementType(articleTag) && !isDescendantOfElementType(sectionTag))
@@ -675,6 +678,9 @@ bool AXRenderObject::computeAccessibilityIsIgnored() const
if (roleValue() == DialogRole)
return false;
+ if (roleValue() == FigureRole)
+ return false;
+
// if this element has aria attributes on it, it should not be ignored.
if (supportsARIAAttributes())
return false;
« no previous file with comments | « Source/core/accessibility/AXObject.h ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698