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

Unified Diff: third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp

Issue 2653063002: Add 4 ARIA 1.1 attributes using new sparse attribute interface. (Closed)
Patch Set: Rebase 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
Index: third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
index 235cd9b5e1263f50375f057e118ea7b78008e28d..8df32816daf20dec44c87d1fd64e831e489eaf02 100644
--- a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
@@ -341,9 +341,24 @@ class SparseAttributeAXPropertyAdapter
Member<AXObject> m_axObject;
protocol::Array<AXProperty>& m_properties;
- void addBoolAttribute(AXBoolAttribute attribute, bool value) {}
+ void addBoolAttribute(AXBoolAttribute attribute, bool value) {
+ // Implement this when we add the first sparse bool attribute.
+ }
- void addStringAttribute(AXStringAttribute attribute, const String& value) {}
+ void addStringAttribute(AXStringAttribute attribute, const String& value) {
+ switch (attribute) {
+ case AXStringAttribute::AriaKeyShortcuts:
+ m_properties.addItem(
+ createProperty(AXGlobalStatesEnum::Keyshortcuts,
+ createValue(value, AXValueTypeEnum::String)));
+ break;
+ case AXStringAttribute::AriaRoleDescription:
+ m_properties.addItem(
+ createProperty(AXGlobalStatesEnum::Roledescription,
+ createValue(value, AXValueTypeEnum::String)));
+ break;
+ }
+ }
void addObjectAttribute(AXObjectAttribute attribute, AXObject& object) {
switch (attribute) {
@@ -352,6 +367,11 @@ class SparseAttributeAXPropertyAdapter
createProperty(AXRelationshipAttributesEnum::Activedescendant,
createRelatedNodeListValue(object)));
break;
+ case AXObjectAttribute::AriaErrorMessage:
+ m_properties.addItem(
+ createProperty(AXRelationshipAttributesEnum::Errormessage,
+ createRelatedNodeListValue(object)));
+ break;
}
}
@@ -363,6 +383,11 @@ class SparseAttributeAXPropertyAdapter
AXRelationshipAttributesEnum::Controls, objects, aria_controlsAttr,
*m_axObject));
break;
+ case AXObjectVectorAttribute::AriaDetails:
+ m_properties.addItem(createRelatedNodeListProperty(
+ AXRelationshipAttributesEnum::Details, objects, aria_controlsAttr,
+ *m_axObject));
+ break;
case AXObjectVectorAttribute::AriaFlowTo:
m_properties.addItem(createRelatedNodeListProperty(
AXRelationshipAttributesEnum::Flowto, objects, aria_flowtoAttr,
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXObject.h ('k') | third_party/WebKit/Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698