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

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

Issue 679623002: Check whether aria-expanded attribute is defined (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add COMPILE ASSERT for new enum type Created 6 years, 2 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/AXNodeObject.h ('k') | Source/core/accessibility/AXObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXNodeObject.cpp
diff --git a/Source/core/accessibility/AXNodeObject.cpp b/Source/core/accessibility/AXNodeObject.cpp
index 7a08650708dfe5bc8a2eaf8c3b83d960a40a2b44..200e3da6135f0af24617d8fff1f0a89383b0e85a 100644
--- a/Source/core/accessibility/AXNodeObject.cpp
+++ b/Source/core/accessibility/AXNodeObject.cpp
@@ -709,12 +709,15 @@ bool AXNodeObject::isEnabled() const
return !toElement(node)->isDisabledFormControl();
}
-bool AXNodeObject::isExpanded() const
+AccessibilityExpanded AXNodeObject::isExpanded() const
{
- if (equalIgnoringCase(getAttribute(aria_expandedAttr), "true"))
- return true;
+ const AtomicString& expanded = getAttribute(aria_expandedAttr);
+ if (equalIgnoringCase(expanded, "true"))
+ return ExpandedExpanded;
+ if (equalIgnoringCase(expanded, "false"))
+ return ExpandedCollapsed;
- return false;
+ return ExpandedUndefined;
}
bool AXNodeObject::isIndeterminate() const
@@ -1101,7 +1104,6 @@ String AXNodeObject::ariaDescribedByAttribute() const
return accessibilityDescriptionForElements(elements);
}
-
String AXNodeObject::ariaLabeledByAttribute() const
{
WillBeHeapVector<RawPtrWillBeMember<Element> > elements;
« no previous file with comments | « Source/core/accessibility/AXNodeObject.h ('k') | Source/core/accessibility/AXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698