Commit 1f897272 authored by cfleizach@apple.com's avatar cfleizach@apple.com
Browse files

WebKit does not expose @required or @aria-required as AXRequired on select elements

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

Reviewed by Tim Horton.

Source/WebCore: 

Make sure button types can return the AXRequired attribute.

Tests: platform/mac/accessibility/aria-required-popup-button.html

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

LayoutTests: 

* platform/mac/accessibility/aria-required-popup-button-expected.txt: Added.
* platform/mac/accessibility/aria-required-popup-button.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 38a1e325
2013-03-26 Chris Fleizach <cfleizach@apple.com>
WebKit does not expose @required or @aria-required as AXRequired on select elements
https://bugs.webkit.org/show_bug.cgi?id=113339
Reviewed by Tim Horton.
* platform/mac/accessibility/aria-required-popup-button-expected.txt: Added.
* platform/mac/accessibility/aria-required-popup-button.html: Added.
2013-03-26 Filip Pizlo <fpizlo@apple.com> 2013-03-26 Filip Pizlo <fpizlo@apple.com>
   
REGRESSION: Sometimes, operations on proven strings ignore changes to the string prototype REGRESSION: Sometimes, operations on proven strings ignore changes to the string prototype
This tests that AXRequired is reported for popup buttons.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Verify required attribute works as expected.
PASS button1.isAttributeSupported('AXRequired') is true
PASS button1.boolAttributeValue('AXRequired') is true
Verify aria-required attribute works as expected.
PASS button2.isAttributeSupported('AXRequired') is true
PASS button2.boolAttributeValue('AXRequired') is true
Verify aria-required attribute works when it's false.
PASS button3.isAttributeSupported('AXRequired') is true
PASS button3.boolAttributeValue('AXRequired') is false
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../fast/js/resources/js-test-pre.js"></script>
</head>
<body id="body">
<div id="group">
<select id="s1" required>
<option>Foo</option>
<option>Bar</option>
<option>Baz</option>
</select><br><br>
<select id="s2" aria-required="true">
<option>Foo</option>
<option>Bar</option>
<option>Baz</option>
</select>
<select id="s3" aria-required="false">
<option>Foo</option>
<option>Bar</option>
<option>Baz</option>
</select>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that AXRequired is reported for popup buttons.");
if (window.accessibilityController) {
debug("Verify required attribute works as expected.");
var button1 = accessibilityController.accessibleElementById("s1");
shouldBeTrue("button1.isAttributeSupported('AXRequired')");
shouldBeTrue("button1.boolAttributeValue('AXRequired')");
debug("Verify aria-required attribute works as expected.");
var button2 = accessibilityController.accessibleElementById("s2");
shouldBeTrue("button2.isAttributeSupported('AXRequired')");
shouldBeTrue("button2.boolAttributeValue('AXRequired')");
debug("Verify aria-required attribute works when it's false.");
var button3 = accessibilityController.accessibleElementById("s3");
shouldBeTrue("button3.isAttributeSupported('AXRequired')");
shouldBeFalse("button3.boolAttributeValue('AXRequired')");
document.getElementById("group").style.visibility = 'hidden';
}
</script>
<script src="../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
2013-03-26 Chris Fleizach <cfleizach@apple.com>
WebKit does not expose @required or @aria-required as AXRequired on select elements
https://bugs.webkit.org/show_bug.cgi?id=113339
Reviewed by Tim Horton.
Make sure button types can return the AXRequired attribute.
Tests: platform/mac/accessibility/aria-required-popup-button.html
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2013-03-26 Dean Jackson <dino@apple.com> 2013-03-26 Dean Jackson <dino@apple.com>
   
When a primary plugin is restarted, also start similar plugins When a primary plugin is restarted, also start similar plugins
...@@ -1220,6 +1220,7 @@ static id textMarkerRangeFromVisiblePositions(AXObjectCache *cache, VisiblePosit ...@@ -1220,6 +1220,7 @@ static id textMarkerRangeFromVisiblePositions(AXObjectCache *cache, VisiblePosit
[tempArray removeObject:NSAccessibilityValueAttribute]; [tempArray removeObject:NSAccessibilityValueAttribute];
[tempArray addObject:NSAccessibilityTitleUIElementAttribute]; [tempArray addObject:NSAccessibilityTitleUIElementAttribute];
[tempArray addObject:NSAccessibilityAccessKeyAttribute]; [tempArray addObject:NSAccessibilityAccessKeyAttribute];
[tempArray addObject:NSAccessibilityRequiredAttribute];
buttonAttrs = [[NSArray alloc] initWithArray:tempArray]; buttonAttrs = [[NSArray alloc] initWithArray:tempArray];
[tempArray release]; [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