AX: AXFocused not exposed on ARIA menuitems

https://bugs.webkit.org/show_bug.cgi?id=123494

Reviewed by Chris Fleizach.

Source/WebCore:

ARIA menuitems should expose AXFocused accessibility attribute.

Test: platform/mac/accessibility/aria-menuitem-focus.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):

LayoutTests:

Adding test to make sure ARIA menuitems expose each piece of their focus state correctly.

* platform/mac/accessibility/aria-menuitem-focus-expected.txt: Added.
* platform/mac/accessibility/aria-menuitem-focus.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d9bc7dbe
2013-10-30 Samuel White <samuel_white@apple.com>
AX: AXFocused not exposed on ARIA menuitems
https://bugs.webkit.org/show_bug.cgi?id=123494
Reviewed by Chris Fleizach.
Adding test to make sure ARIA menuitems expose each piece of their focus state correctly.
* platform/mac/accessibility/aria-menuitem-focus-expected.txt: Added.
* platform/mac/accessibility/aria-menuitem-focus.html: Added.
2013-10-30 Ryosuke Niwa <rniwa@webkit.org>
Delete the expected results for Lion.
......
Item 0
Item 1
This tests that ARIA menuitems expose AXFocused correctly.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS item.isAttributeSupported('AXFocused') is true
PASS item.isAttributeSettable('AXFocused') is true
PASS item.boolAttributeValue('AXFocused') is false
PASS item.boolAttributeValue('AXFocused') is true
PASS item.isAttributeSupported('AXFocused') is true
PASS item.isAttributeSettable('AXFocused') is true
PASS item.boolAttributeValue('AXFocused') is false
PASS item.boolAttributeValue('AXFocused') is true
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
<title>ARIA menuitem Focus</title>
</head>
<body>
<div role="menu">
<div class="item" id="i0" role="menuitem" tabindex="-1">Item 0</div>
<div class="item" id="i1" role="menuitem" tabindex="-1">Item 1</div>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that ARIA menuitems expose AXFocused correctly.");
if (window.accessibilityController) {
var itemCount = document.getElementsByClassName("item").length;
for (var i = 0; i < itemCount; ++i) {
var item = accessibilityController.accessibleElementById("i" + i);
shouldBeTrue("item.isAttributeSupported('AXFocused')");
shouldBeTrue("item.isAttributeSettable('AXFocused')");
shouldBeFalse("item.boolAttributeValue('AXFocused')");
// Set focus.
document.getElementById("i" + i).focus();
shouldBeTrue("item.boolAttributeValue('AXFocused')");
}
}
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>
2013-10-30 Samuel White <samuel_white@apple.com>
AX: AXFocused not exposed on ARIA menuitems
https://bugs.webkit.org/show_bug.cgi?id=123494
Reviewed by Chris Fleizach.
ARIA menuitems should expose AXFocused accessibility attribute.
Test: platform/mac/accessibility/aria-menuitem-focus.html
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2013-10-30 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove basic uses of InspectorState from agents
......
......@@ -1249,6 +1249,7 @@ static id textMarkerRangeFromVisiblePositions(AXObjectCache *cache, VisiblePosit
[tempArray addObject:(NSString*)kAXMenuItemMarkCharAttribute];
[tempArray addObject:(NSString*)kAXMenuItemPrimaryUIElementAttribute];
[tempArray addObject:NSAccessibilityServesAsTitleForUIElementsAttribute];
[tempArray addObject:NSAccessibilityFocusedAttribute];
menuItemAttrs = [[NSArray alloc] initWithArray:tempArray];
[tempArray release];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment