[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
cfleizach at apple.com
cfleizach at apple.com
Tue Jan 5 23:42:05 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 619afecea5e9c523fcf7a7239364a26001e01e47
Author: cfleizach at apple.com <cfleizach at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 4 02:06:58 2009 +0000
AX: VO just says "term" on many web sites
https://bugs.webkit.org/show_bug.cgi?id=32139
Reviewed by Eric Seidel.
WebCore:
Test: platform/mac/accessibility/definition-list-term.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityDescription):
* accessibility/mac/AccessibilityObjectWrapper.mm:
(-[AccessibilityObjectWrapper subrole]):
(-[AccessibilityObjectWrapper roleDescription]):
WebKitTools:
* DumpRenderTree/AccessibilityUIElement.cpp:
(getRoleDescriptionCallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
(AccessibilityUIElement::roleDescription):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::roleDescription):
* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::roleDescription):
LayoutTests:
* platform/mac/accessibility/aria-grouping-roles-expected.txt:
* platform/mac/accessibility/aria-grouping-roles.html:
* platform/mac/accessibility/definition-list-term-expected.txt: Added.
* platform/mac/accessibility/definition-list-term.html: Added.
* platform/mac/accessibility/lists-expected.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ea5c8b2..8e4ac2b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,18 @@
2009-12-03 Chris Fleizach <cfleizach at apple.com>
+ Reviewed by Eric Seidel.
+
+ AX: VO just says "term" on many web sites
+ https://bugs.webkit.org/show_bug.cgi?id=32139
+
+ * platform/mac/accessibility/aria-grouping-roles-expected.txt:
+ * platform/mac/accessibility/aria-grouping-roles.html:
+ * platform/mac/accessibility/definition-list-term-expected.txt: Added.
+ * platform/mac/accessibility/definition-list-term.html: Added.
+ * platform/mac/accessibility/lists-expected.txt:
+
+2009-12-03 Chris Fleizach <cfleizach at apple.com>
+
Reviewed by Beth Dakin.
Implement WAI-ARIA scrollbar role and related property aria-orientation
diff --git a/LayoutTests/platform/mac/accessibility/aria-grouping-roles-expected.txt b/LayoutTests/platform/mac/accessibility/aria-grouping-roles-expected.txt
index 20c50d3..c8e2ff1 100644
--- a/LayoutTests/platform/mac/accessibility/aria-grouping-roles-expected.txt
+++ b/LayoutTests/platform/mac/accessibility/aria-grouping-roles-expected.txt
@@ -53,7 +53,7 @@ PASS obj.childAtIndex(k).subrole is "AXSubrole: AXUserInterfaceTooltip"
PASS obj.childAtIndex(k).role is 'AXRole: AXGroup'
PASS obj.childAtIndex(k).subrole is "AXSubrole: AXDocumentMath"
PASS obj.childAtIndex(k).role is 'AXRole: AXGroup'
-PASS obj.childAtIndex(k).description is 'AXDescription: definition'
+PASS obj.childAtIndex(k).subrole is "AXSubrole: AXDefinition"
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/platform/mac/accessibility/aria-grouping-roles.html b/LayoutTests/platform/mac/accessibility/aria-grouping-roles.html
index d3a2b5b..294ecea 100644
--- a/LayoutTests/platform/mac/accessibility/aria-grouping-roles.html
+++ b/LayoutTests/platform/mac/accessibility/aria-grouping-roles.html
@@ -43,17 +43,12 @@ var successfullyParsed = false;
var subroles = new Array("AXLandmarkApplication","AXDocumentArticle","AXLandmarkBanner","AXLandmarkComplementary",
"AXLandmarkContentInfo", "AXDocument", "AXApplicationLog", "AXLandmarkMain", "AXApplicationMarquee",
"AXDocumentNote", "AXLandmarkNavigation", "AXDocumentRegion", "AXLandmarkSearch", "AXApplicationStatus",
- "AXUserInterfaceTooltip", "AXDocumentMath");
+ "AXUserInterfaceTooltip", "AXDocumentMath", "AXDefinition");
for (var k = 0; k < subroles.length; k++) {
shouldBe("obj.childAtIndex(k).role", "'AXRole: AXGroup'");
shouldBe("obj.childAtIndex(k).subrole", '"AXSubrole: ' + subroles[k] + '"');
}
-
- // Definition role is a plain AXGroup with a AXDescription
- shouldBe("obj.childAtIndex(k).role", "'AXRole: AXGroup'");
- shouldBe("obj.childAtIndex(k).description", "'AXDescription: definition'");
-
}
successfullyParsed = true;
diff --git a/LayoutTests/platform/mac/accessibility/definition-list-term-expected.txt b/LayoutTests/platform/mac/accessibility/definition-list-term-expected.txt
new file mode 100644
index 0000000..e5b2511
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/definition-list-term-expected.txt
@@ -0,0 +1,21 @@
+term role
+definition
+definition
+This tests that each of these ARIA grouping type roles map to the right role and subrole.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS obj.childAtIndex(0).role is 'AXRole: AXGroup'
+PASS obj.childAtIndex(0).subrole is "AXSubrole: AXTerm"
+PASS obj.childAtIndex(0).roleDescription is "AXRoleDescription: term"
+PASS obj.childAtIndex(1).role is 'AXRole: AXGroup'
+PASS obj.childAtIndex(1).subrole is "AXSubrole: AXDefinition"
+PASS obj.childAtIndex(1).roleDescription is "AXRoleDescription: definition"
+PASS obj.childAtIndex(1).role is 'AXRole: AXGroup'
+PASS obj.childAtIndex(1).subrole is "AXSubrole: AXDefinition"
+PASS obj.childAtIndex(1).roleDescription is "AXRoleDescription: definition"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/mac/accessibility/definition-list-term.html b/LayoutTests/platform/mac/accessibility/definition-list-term.html
new file mode 100644
index 0000000..bf2b81f
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/definition-list-term.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
+<script>
+var successfullyParsed = false;
+</script>
+<script src="../../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body id="body">
+
+
+<dt>term role</dt>
+<dd>definition</dd>
+<div role="definition">definition</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that each of these ARIA grouping type roles map to the right role and subrole.");
+
+ if (window.accessibilityController) {
+
+ // this text field should be required.
+ document.getElementById("body").focus();
+ var obj = accessibilityController.focusedElement;
+
+ shouldBe("obj.childAtIndex(0).role", "'AXRole: AXGroup'");
+ shouldBe("obj.childAtIndex(0).subrole", '"AXSubrole: AXTerm"');
+ shouldBe("obj.childAtIndex(0).roleDescription", '"AXRoleDescription: term"');
+
+ shouldBe("obj.childAtIndex(1).role", "'AXRole: AXGroup'");
+ shouldBe("obj.childAtIndex(1).subrole", '"AXSubrole: AXDefinition"');
+ shouldBe("obj.childAtIndex(1).roleDescription", '"AXRoleDescription: definition"');
+
+ shouldBe("obj.childAtIndex(1).role", "'AXRole: AXGroup'");
+ shouldBe("obj.childAtIndex(1).subrole", '"AXSubrole: AXDefinition"');
+ shouldBe("obj.childAtIndex(1).roleDescription", '"AXRoleDescription: definition"');
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/accessibility/lists-expected.txt b/LayoutTests/platform/mac/accessibility/lists-expected.txt
index f4f3c10..b84fbec 100644
--- a/LayoutTests/platform/mac/accessibility/lists-expected.txt
+++ b/LayoutTests/platform/mac/accessibility/lists-expected.txt
@@ -249,14 +249,14 @@ AXTitleUIElement: (null)
AXRole: AXGroup
-AXSubrole: (null)
-AXRoleDescription: group
+AXSubrole: AXTerm
+AXRoleDescription: term
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
AXSize: NSSize: {769, 18}
AXTitle:
-AXDescription: term
+AXDescription:
AXValue:
AXFocused: 0
AXEnabled: 1
@@ -272,14 +272,14 @@ AXTopLevelUIElement: <AXGroup>
------------
AXRole: AXGroup
-AXSubrole: (null)
-AXRoleDescription: group
+AXSubrole: AXDefinition
+AXRoleDescription: definition
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
AXSize: NSSize: {729, 18}
AXTitle:
-AXDescription: definition
+AXDescription:
AXValue:
AXFocused: 0
AXEnabled: 1
@@ -295,14 +295,14 @@ AXTopLevelUIElement: <AXGroup>
------------
AXRole: AXGroup
-AXSubrole: (null)
-AXRoleDescription: group
+AXSubrole: AXTerm
+AXRoleDescription: term
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
AXSize: NSSize: {769, 18}
AXTitle:
-AXDescription: term
+AXDescription:
AXValue:
AXFocused: 0
AXEnabled: 1
@@ -318,14 +318,14 @@ AXTopLevelUIElement: <AXGroup>
------------
AXRole: AXGroup
-AXSubrole: (null)
-AXRoleDescription: group
+AXSubrole: AXDefinition
+AXRoleDescription: definition
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
AXSize: NSSize: {729, 18}
AXTitle:
-AXDescription: definition
+AXDescription:
AXValue:
AXFocused: 0
AXEnabled: 1
@@ -341,14 +341,14 @@ AXTopLevelUIElement: <AXGroup>
------------
AXRole: AXGroup
-AXSubrole: (null)
-AXRoleDescription: group
+AXSubrole: AXDefinition
+AXRoleDescription: definition
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXGroup>
AXSize: NSSize: {729, 18}
AXTitle:
-AXDescription: definition
+AXDescription:
AXValue:
AXFocused: 0
AXEnabled: 1
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 217ddaa..b88bae0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,20 @@
2009-12-03 Chris Fleizach <cfleizach at apple.com>
+ Reviewed by Eric Seidel.
+
+ AX: VO just says "term" on many web sites
+ https://bugs.webkit.org/show_bug.cgi?id=32139
+
+ Test: platform/mac/accessibility/definition-list-term.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::accessibilityDescription):
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper subrole]):
+ (-[AccessibilityObjectWrapper roleDescription]):
+
+2009-12-03 Chris Fleizach <cfleizach at apple.com>
+
Reviewed by Beth Dakin.
Implement WAI-ARIA scrollbar role and related property aria-orientation
diff --git a/WebCore/accessibility/AccessibilityRenderObject.cpp b/WebCore/accessibility/AccessibilityRenderObject.cpp
index 95a5f9d..63937b4 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -1116,12 +1116,7 @@ String AccessibilityRenderObject::accessibilityDescription() const
if (owner && owner->isHTMLElement())
return static_cast<HTMLElement*>(owner)->getAttribute(nameAttr);
}
-
- if (roleValue() == DefinitionListTermRole)
- return AXDefinitionListTermText();
- if (roleValue() == DefinitionListDefinitionRole)
- return AXDefinitionListDefinitionText();
-
+
return String();
}
@@ -1762,10 +1757,6 @@ bool AccessibilityRenderObject::isSelected() const
if (equalIgnoringCase(ariaSelected, "true"))
return true;
- // ARIA says that selection should follow focus unless specifically set otherwise.
- if (!equalIgnoringCase(ariaSelected, "false") && isFocused())
- return true;
-
if (isTabItem() && isTabItemSelected())
return true;
diff --git a/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm b/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
index 27b826a..0a857b0 100644
--- a/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
+++ b/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
@@ -1190,7 +1190,10 @@ static NSString* roleValueToNSString(AccessibilityRole value)
return @"AXUserInterfaceTooltip";
case TabPanelRole:
return @"AXTabPanel";
-
+ case DefinitionListTermRole:
+ return @"AXTerm";
+ case DefinitionListDefinitionRole:
+ return @"AXDefinition";
// Default doesn't return anything, so roles defined below can be chosen.
default:
break;
@@ -1259,6 +1262,10 @@ static NSString* roleValueToNSString(AccessibilityRole value)
return AXARIAContentGroupText(@"ARIAUserInterfaceTooltip");
case TabPanelRole:
return AXARIAContentGroupText(@"ARIATabPanel");
+ case DefinitionListTermRole:
+ return AXDefinitionListTermText();
+ case DefinitionListDefinitionRole:
+ return AXDefinitionListDefinitionText();
}
}
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 7b361af..2d36a93 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,5 +1,23 @@
2009-12-03 Chris Fleizach <cfleizach at apple.com>
+ Reviewed by Eric Seidel.
+
+ AX: VO just says "term" on many web sites
+ https://bugs.webkit.org/show_bug.cgi?id=32139
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (getRoleDescriptionCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::roleDescription):
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::roleDescription):
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::roleDescription):
+
+2009-12-03 Chris Fleizach <cfleizach at apple.com>
+
Reviewed by Beth Dakin.
Implement WAI-ARIA scrollbar role and related property aria-orientation
diff --git a/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp b/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
index 0dac0a0..9268b46 100644
--- a/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
+++ b/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
@@ -347,6 +347,12 @@ static JSValueRef getSubroleCallback(JSContextRef context, JSObjectRef thisObjec
return JSValueMakeString(context, role.get());
}
+static JSValueRef getRoleDescriptionCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> roleDesc(Adopt, toAXElement(thisObject)->roleDescription());
+ return JSValueMakeString(context, roleDesc.get());
+}
+
static JSValueRef getTitleCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
{
JSRetainPtr<JSStringRef> title(Adopt, toAXElement(thisObject)->title());
@@ -507,6 +513,7 @@ JSClassRef AccessibilityUIElement::getJSClass()
{ "accessibilityValue", getAccessibilityValueCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "role", getRoleCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "subrole", getSubroleCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "roleDescription", getRoleDescriptionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "title", getTitleCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "description", getDescriptionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "language", getLanguageCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
diff --git a/WebKitTools/DumpRenderTree/AccessibilityUIElement.h b/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
index ba6a635..10529f6 100644
--- a/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
+++ b/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
@@ -90,6 +90,7 @@ public:
bool isActionSupported(JSStringRef action);
JSStringRef role();
JSStringRef subrole();
+ JSStringRef roleDescription();
JSStringRef title();
JSStringRef description();
JSStringRef language();
diff --git a/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp b/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
index 71d7f19..a92d68c 100644
--- a/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
@@ -161,6 +161,11 @@ JSStringRef AccessibilityUIElement::subrole()
return 0;
}
+JSStringRef AccessibilityUIElement::roleDescription()
+{
+ return 0;
+}
+
JSStringRef AccessibilityUIElement::title()
{
const gchar* name = atk_object_get_name(ATK_OBJECT(m_element));
diff --git a/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm b/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
index 8f6f550..2512aa9 100644
--- a/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
@@ -374,6 +374,12 @@ JSStringRef AccessibilityUIElement::subrole()
return concatenateAttributeAndValue(@"AXSubrole", role);
}
+JSStringRef AccessibilityUIElement::roleDescription()
+{
+ NSString* role = descriptionOfValue([m_element accessibilityAttributeValue:NSAccessibilityRoleDescriptionAttribute], m_element);
+ return concatenateAttributeAndValue(@"AXRoleDescription", role);
+}
+
JSStringRef AccessibilityUIElement::title()
{
NSString* title = descriptionOfValue([m_element accessibilityAttributeValue:NSAccessibilityTitleAttribute], m_element);
diff --git a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
index d77929e..2acc4a4 100644
--- a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
+++ b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
@@ -176,6 +176,11 @@ JSStringRef AccessibilityUIElement::subrole()
return 0;
}
+JSStringRef AccessibilityUIElement::roleDescription()
+{
+ return 0;
+}
+
JSStringRef AccessibilityUIElement::title()
{
BSTR titleBSTR;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list