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

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

Issue 795833003: A link inside a <label> element is not accessible (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modifying testcase to be more readable Created 6 years 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 | « LayoutTests/accessibility/link-inside-label-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXNodeObject.cpp
diff --git a/Source/modules/accessibility/AXNodeObject.cpp b/Source/modules/accessibility/AXNodeObject.cpp
index 151bb67176eda090b410c3d42c3c3fd1d72b8158..283266f39be1ae1cc6921800e855ff3614f247b3 100644
--- a/Source/modules/accessibility/AXNodeObject.cpp
+++ b/Source/modules/accessibility/AXNodeObject.cpp
@@ -1624,6 +1624,10 @@ HTMLLabelElement* AXNodeObject::labelElementContainer() const
if (isControl())
return 0;
+ // the link element should not be considered part of the label
+ if (isLink())
+ return 0;
+
// find if this has a ancestor that is a label
return Traversal<HTMLLabelElement>::firstAncestorOrSelf(*node());
}
« no previous file with comments | « LayoutTests/accessibility/link-inside-label-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698