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

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

Issue 1473833002: Fix bugs in accessible name calculation code exposed by Bryan Garaventa's test files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dumb_mistake
Patch Set: Fix android test expectation Created 5 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
Index: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
index 2e734034e760bf391cec6345f1fd7b944ed3e064..177aa5118a1c17d5b1cbe4e412f0dd8b5cb0338c 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
@@ -1621,11 +1621,8 @@ bool AXNodeObject::nameFromLabelElement() const
return false;
// Step 2A from: http://www.w3.org/TR/accname-aam-1.1
- if (layoutObject()
- && layoutObject()->style()->visibility() != VISIBLE
- && !equalIgnoringCase(getAttribute(aria_hiddenAttr), "false")) {
+ if (isHiddenForTextAlternativeCalculation())
return false;
- }
// Step 2B from: http://www.w3.org/TR/accname-aam-1.1
WillBeHeapVector<RawPtrWillBeMember<Element>> elements;
@@ -2460,7 +2457,8 @@ String AXNodeObject::description(AXNameFrom nameFrom, AXDescriptionFrom& descrip
for (size_t i = 0; i < relatedObjects.size(); i++)
descriptionObjects->append(relatedObjects[i]->object);
}
- return result;
+
+ return collapseWhitespace(result);
}
// Based on http://rawgit.com/w3c/aria/master/html-aam/html-aam.html#accessible-name-and-description-calculation

Powered by Google App Engine
This is Rietveld 408576698