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

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

Issue 779513007: Introduce new API ariaAutoComplete() to expose correct state and object attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixing nit 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 | « Source/modules/accessibility/AXNodeObject.h ('k') | Source/modules/accessibility/AXObject.h » ('j') | 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 eb02857b3fe1f79559c0f342351ea1475c4c8600..a35efa7a4b37080b738556c4f4299e2b35368044 100644
--- a/Source/modules/accessibility/AXNodeObject.cpp
+++ b/Source/modules/accessibility/AXNodeObject.cpp
@@ -951,6 +951,20 @@ unsigned AXNodeObject::hierarchicalLevel() const
return level;
}
+String AXNodeObject::ariaAutoComplete() const
+{
+ if (roleValue() != ComboBoxRole && roleValue() != TextAreaRole)
+ return String();
+
+ const AtomicString& ariaAutoComplete = getAttribute(aria_autocompleteAttr).lower();
+
+ if (ariaAutoComplete == "inline" || ariaAutoComplete == "list"
+ || ariaAutoComplete == "both")
+ return ariaAutoComplete;
+
+ return String();
+}
+
String AXNodeObject::text() const
{
// If this is a user defined static text, use the accessible name computation.
« no previous file with comments | « Source/modules/accessibility/AXNodeObject.h ('k') | Source/modules/accessibility/AXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698