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

Unified Diff: third_party/WebKit/public/web/WebAXObject.h

Issue 2589273002: Add sparse accessibility attribute interface to Blink (Closed)
Patch Set: Address feedback Created 3 years, 11 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 | « third_party/WebKit/public/web/WebAXEnums.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/web/WebAXObject.h
diff --git a/third_party/WebKit/public/web/WebAXObject.h b/third_party/WebKit/public/web/WebAXObject.h
index 32a2570b2ee5d5c85b510cc185e287284e7a8453..b7712b238034e6e0749be90e99a4faca9cc67d7f 100644
--- a/third_party/WebKit/public/web/WebAXObject.h
+++ b/third_party/WebKit/public/web/WebAXObject.h
@@ -55,6 +55,18 @@ struct WebPoint;
struct WebRect;
struct WebSize;
+class BLINK_EXPORT WebAXSparseAttributeClient {
+ public:
+ WebAXSparseAttributeClient() {}
+ virtual ~WebAXSparseAttributeClient() {}
+
+ virtual void addBoolAttribute(WebAXBoolAttribute, bool) = 0;
+ virtual void addStringAttribute(WebAXStringAttribute, const WebString&) = 0;
+ virtual void addObjectAttribute(WebAXObjectAttribute, const WebAXObject&) = 0;
+ virtual void addObjectVectorAttribute(WebAXObjectVectorAttribute,
+ const WebVector<WebAXObject>&) = 0;
+};
+
// An instance of this class, while kept alive, indicates that accessibility
// should be temporarily enabled. If accessibility was enabled globally
// (WebSettings::setAccessibilityEnabled), this will have no effect.
@@ -107,6 +119,12 @@ class WebAXObject {
BLINK_EXPORT WebAXObject childAt(unsigned) const;
BLINK_EXPORT WebAXObject parentObject() const;
+ // Retrieve accessibility attributes that apply to only a small
+ // fraction of WebAXObjects by passing an implementation of
+ // WebAXSparseAttributeClient, which will be called with only the attributes
+ // that apply to this object.
+ BLINK_EXPORT void getSparseAXAttributes(WebAXSparseAttributeClient&) const;
+
BLINK_EXPORT bool isAnchor() const;
BLINK_EXPORT bool isAriaReadOnly() const;
BLINK_EXPORT bool isButtonStateMixed() const;
@@ -139,10 +157,7 @@ class WebAXObject {
BLINK_EXPORT unsigned colorValue() const;
BLINK_EXPORT WebAXObject ariaActiveDescendant() const;
BLINK_EXPORT WebString ariaAutoComplete() const;
- BLINK_EXPORT bool ariaControls(
- WebVector<WebAXObject>& controlsElements) const;
BLINK_EXPORT WebAXAriaCurrentState ariaCurrentState() const;
- BLINK_EXPORT bool ariaFlowTo(WebVector<WebAXObject>& flowToElements) const;
BLINK_EXPORT bool ariaHasPopup() const;
BLINK_EXPORT bool isEditable() const;
BLINK_EXPORT bool isMultiline() const;
« no previous file with comments | « third_party/WebKit/public/web/WebAXEnums.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698