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

Unified Diff: third_party/WebKit/Source/core/dom/AccessibleNode.cpp

Issue 2788523002: Finish all string attributes for Accessibility Object Model Phase 1. (Closed)
Patch Set: Rebase Created 3 years, 9 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
Index: third_party/WebKit/Source/core/dom/AccessibleNode.cpp
diff --git a/third_party/WebKit/Source/core/dom/AccessibleNode.cpp b/third_party/WebKit/Source/core/dom/AccessibleNode.cpp
index 307d73fd1cb62ed5fcc906778643c6f6f9e1b6b0..d7738a8fc166ce899b9d211589e3ed4f9cfde153 100644
--- a/third_party/WebKit/Source/core/dom/AccessibleNode.cpp
+++ b/third_party/WebKit/Source/core/dom/AccessibleNode.cpp
@@ -55,8 +55,32 @@ void AccessibleNode::setRole(const AtomicString& role) {
cache->handleAttributeChanged(HTMLNames::roleAttr, m_element);
}
-AtomicString AccessibleNode::label() const {
- return getProperty(m_element, AOMStringProperty::kLabel);
+AtomicString AccessibleNode::roleDescription() const {
+ return getProperty(m_element, AOMStringProperty::kRoleDescription);
+}
+
+void AccessibleNode::setRoleDescription(const AtomicString& roleDescription) {
+ setStringProperty(AOMStringProperty::kRoleDescription, roleDescription);
+
+ if (AXObjectCache* cache = m_element->document().axObjectCache()) {
+ cache->handleAttributeChanged(HTMLNames::aria_roledescriptionAttr,
+ m_element);
+ }
+}
+
+AtomicString AccessibleNode::sort() const {
+ return getProperty(m_element, AOMStringProperty::kSort);
+}
+
+void AccessibleNode::setSort(const AtomicString& sort) {
+ setStringProperty(AOMStringProperty::kSort, sort);
+
+ if (AXObjectCache* cache = m_element->document().axObjectCache())
+ cache->handleAttributeChanged(HTMLNames::aria_sortAttr, m_element);
+}
+
+AtomicString AccessibleNode::valueText() const {
+ return getProperty(m_element, AOMStringProperty::kValueText);
}
void AccessibleNode::setLabel(const AtomicString& label) {

Powered by Google App Engine
This is Rietveld 408576698