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

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

Issue 2805493002: Boolean properties for Accessibility Object Model Phase 1 (Closed)
Patch Set: Created 3 years, 8 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.h
diff --git a/third_party/WebKit/Source/core/dom/AccessibleNode.h b/third_party/WebKit/Source/core/dom/AccessibleNode.h
index 8eb574c0c4fe022bf47d1aceeead40564db20277..b00eacdd8daa046a864afeaf2de193445179f9f3 100644
--- a/third_party/WebKit/Source/core/dom/AccessibleNode.h
+++ b/third_party/WebKit/Source/core/dom/AccessibleNode.h
@@ -37,6 +37,21 @@ enum class AOMStringProperty {
kValueText
};
+// All of the properties of AccessibleNode that have type "boolean".
+enum class AOMBooleanProperty {
+ kAtomic,
+ kBusy,
+ kDisabled,
+ kExpanded,
+ kHidden,
+ kModal,
+ kMultiline,
+ kMultiselectable,
+ kReadOnly,
+ kRequired,
+ kSelected
+};
+
// Accessibility Object Model node
// Explainer: https://github.com/WICG/aom/blob/master/explainer.md
// Spec: https://wicg.github.io/aom/spec/
@@ -53,15 +68,36 @@ class CORE_EXPORT AccessibleNode
// otherwise returns the equivalent ARIA attribute.
static const AtomicString& getProperty(Element*, AOMStringProperty);
+ // Returns the alue of the given boolean property if the
aboxhall 2017/04/07 05:22:35 typo "alue"
dmazzoni 2017/04/21 07:11:37 Done.
+ // Element has an AccessibleNode, otherwise returns the equivalent
+ // ARIA attribute. Sets |isNull| if the property and attribute are not
+ // present.
+ static bool getProperty(Element*, AOMBooleanProperty, bool& isNull);
+
+ bool atomic(bool&) const;
+ void setAtomic(bool);
+
AtomicString autocomplete() const;
void setAutocomplete(const AtomicString&);
+ bool busy(bool&) const;
+ void setBusy(bool);
+
AtomicString checked() const;
void setChecked(const AtomicString&);
AtomicString current() const;
void setCurrent(const AtomicString&);
+ bool disabled(bool&) const;
+ void setDisabled(bool);
+
+ bool expanded(bool&) const;
+ void setExpanded(bool);
+
+ bool hidden(bool&) const;
+ void setHidden(bool);
+
AtomicString invalid() const;
void setInvalid(const AtomicString&);
@@ -74,21 +110,39 @@ class CORE_EXPORT AccessibleNode
AtomicString live() const;
void setLive(const AtomicString&);
+ bool modal(bool&) const;
+ void setModal(bool);
+
+ bool multiline(bool&) const;
+ void setMultiline(bool);
+
+ bool multiselectable(bool&) const;
+ void setMultiselectable(bool);
+
AtomicString orientation() const;
void setOrientation(const AtomicString&);
AtomicString placeholder() const;
void setPlaceholder(const AtomicString&);
+ bool readOnly(bool&) const;
+ void setReadOnly(bool);
+
AtomicString relevant() const;
void setRelevant(const AtomicString&);
+ bool required(bool&) const;
+ void setRequired(bool);
+
AtomicString role() const;
void setRole(const AtomicString&);
AtomicString roleDescription() const;
void setRoleDescription(const AtomicString&);
+ bool selected(bool&) const;
+ void setSelected(bool);
+
AtomicString sort() const;
void setSort(const AtomicString&);
@@ -99,10 +153,12 @@ class CORE_EXPORT AccessibleNode
private:
void setStringProperty(AOMStringProperty, const AtomicString&);
+ void setBooleanProperty(AOMBooleanProperty, bool);
void notifyAttributeChanged(const blink::QualifiedName&);
AXObjectCache* getAXObjectCache();
Vector<std::pair<AOMStringProperty, AtomicString>> m_stringProperties;
+ Vector<std::pair<AOMBooleanProperty, bool>> m_booleanProperties;
// This object's owner Element.
Member<Element> m_element;

Powered by Google App Engine
This is Rietveld 408576698