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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXObject.cpp

Issue 1467423002: Implement nameFromLabelElement to see if a control is associated with a label. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@axlayoutobj_null
Patch Set: Created 5 years, 1 month 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 | « third_party/WebKit/Source/modules/accessibility/AXObject.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/accessibility/AXObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
index 5dd1f4cdf24a955960b99b94f821d2d4921cc735..29df97c32bb74b82cf9dfc6b20efe48bf5c6dd3c 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
@@ -723,6 +723,7 @@ String AXObject::ariaTextAlternative(bool recursive, bool inAriaLabelledByTraver
visited.add(this);
// Step 2A from: http://www.w3.org/TR/accname-aam-1.1
+ // If you change this logic, update AXNodeObject::nameFromLabelElement, too.
if (!recursive && layoutObject()
&& layoutObject()->style()->visibility() != VISIBLE
&& !equalIgnoringCase(getAttribute(aria_hiddenAttr), "false")) {
@@ -730,6 +731,7 @@ String AXObject::ariaTextAlternative(bool recursive, bool inAriaLabelledByTraver
}
// Step 2B from: http://www.w3.org/TR/accname-aam-1.1
+ // If you change this logic, update AXNodeObject::nameFromLabelElement, too.
if (!inAriaLabelledByTraversal && !alreadyVisited) {
const QualifiedName& attr = hasAttribute(aria_labeledbyAttr) && !hasAttribute(aria_labelledbyAttr) ? aria_labeledbyAttr : aria_labelledbyAttr;
nameFrom = AXNameFromRelatedElement;
@@ -763,6 +765,7 @@ String AXObject::ariaTextAlternative(bool recursive, bool inAriaLabelledByTraver
}
// Step 2C from: http://www.w3.org/TR/accname-aam-1.1
+ // If you change this logic, update AXNodeObject::nameFromLabelElement, too.
nameFrom = AXNameFromAttribute;
if (nameSources) {
nameSources->append(NameSource(*foundTextAlternative, aria_labelAttr));
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698