-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AX: add a new trait for elements in fieldset on iOS
https://bugs.webkit.org/show_bug.cgi?id=151281 Reviewed by Chris Fleizach. Source/WebCore: Added a new trait for elements in the fieldset, so VoiceOver can speak the legend information for those elements. Test: accessibility/ios-simulator/fieldset-traits.html * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]): (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]): (-[WebAccessibilityObjectWrapper _accessibilityFieldsetAncestor]): (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]): Tools: * DumpRenderTree/AccessibilityUIElement.cpp: (assistiveTechnologySimulatedFocusCallback): (fieldsetAncestorElementCallback): (childAtIndexCallback): (getElementTextLengthCallback): (hasContainedByFieldsetTraitCallback): (AccessibilityUIElement::getJSClass): * DumpRenderTree/AccessibilityUIElement.h: * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (AccessibilityUIElement::elementTextLength): (AccessibilityUIElement::hasContainedByFieldsetTrait): (AccessibilityUIElement::fieldsetAncestorElement): (AccessibilityUIElement::url): * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: (WTR::AccessibilityUIElement::scrollPageDown): (WTR::AccessibilityUIElement::scrollPageLeft): (WTR::AccessibilityUIElement::scrollPageRight): (WTR::AccessibilityUIElement::hasContainedByFieldsetTrait): (WTR::AccessibilityUIElement::fieldsetAncestorElement): * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElement::identifier): (WTR::AccessibilityUIElement::hasContainedByFieldsetTrait): (WTR::AccessibilityUIElement::fieldsetAncestorElement): (WTR::AccessibilityUIElement::rowCount): LayoutTests: * accessibility/ios-simulator/fieldset-traits-expected.txt: Added. * accessibility/ios-simulator/fieldset-traits.html: Added. Canonical link: https://commits.webkit.org/169454@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Nan Wang
committed
Nov 14, 2015
1 parent
23f1dd8
commit 9a8c226
Showing
13 changed files
with
190 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
LayoutTests/accessibility/ios-simulator/fieldset-traits-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Personalia: | ||
Name: | ||
Email: | ||
This tests that elements in a fieldset are having the correct traits. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS inputname.hasContainedByFieldsetTrait is true | ||
PASS fieldset.isEqual(inputname.fieldsetAncestorElement()) is true | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
40 changes: 40 additions & 0 deletions
40
LayoutTests/accessibility/ios-simulator/fieldset-traits.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | ||
<html> | ||
<head> | ||
<script> | ||
var successfullyParsed = false; | ||
</script> | ||
<script src="../../resources/js-test-pre.js"></script> | ||
</head> | ||
<body id="body"> | ||
|
||
<form> | ||
<fieldset id="fieldset"> | ||
<legend>Personalia:</legend> | ||
Name: <input type="text" id="inputname"><br> | ||
Email: <input type="text"><br> | ||
</fieldset> | ||
</form> | ||
|
||
<p id="description"></p> | ||
<div id="console"></div> | ||
|
||
<script> | ||
|
||
description("This tests that elements in a fieldset are having the correct traits."); | ||
|
||
if (window.accessibilityController) { | ||
|
||
var inputname = accessibilityController.accessibleElementById("inputname"); | ||
var fieldset = accessibilityController.accessibleElementById("fieldset"); | ||
shouldBeTrue("inputname.hasContainedByFieldsetTrait"); | ||
shouldBeTrue("fieldset.isEqual(inputname.fieldsetAncestorElement())"); | ||
} | ||
|
||
successfullyParsed = true; | ||
</script> | ||
|
||
<script src="../../resources/js-test-post.js"></script> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters