Skip to content
Permalink
Browse files
AX: Input type: time is not accessible on iOS
https://bugs.webkit.org/show_bug.cgi?id=150984

Reviewed by Chris Fleizach.

Source/WebCore:

Exposed input type: time as popup button on iOS.

Test: accessibility/ios-simulator/input-type-time.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

LayoutTests:

* accessibility/ios-simulator/input-type-time-expected.txt: Added.
* accessibility/ios-simulator/input-type-time.html: Added.


Canonical link: https://commits.webkit.org/169250@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Nan Wang committed Nov 9, 2015
1 parent 07e997c commit fb9b96a22262081af8ba87550cec1fdc2f9da525
Showing 5 changed files with 71 additions and 2 deletions.
@@ -1,3 +1,13 @@
2015-11-09 Nan Wang <n_wang@apple.com>

AX: Input type: time is not accessible on iOS
https://bugs.webkit.org/show_bug.cgi?id=150984

Reviewed by Chris Fleizach.

* accessibility/ios-simulator/input-type-time-expected.txt: Added.
* accessibility/ios-simulator/input-type-time.html: Added.

2015-11-09 Jiewen Tan <jiewen_tan@apple.com>

Null dereference loading Blink layout test editing/inserting/insert-html-crash-01.html
@@ -0,0 +1,12 @@

This tests that input type: time is accessible on iOS.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS timeinput.description is 'AXLabel: (Between: 07:00 AM-09:00 AM)'
PASS timeinput.isIgnored is false
PASS successfullyParsed is true

TEST COMPLETE

@@ -0,0 +1,33 @@
<!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">

<input id="timeinput" type="time" aria-label="(Between: 07:00 AM-09:00 AM)" min="07:00" max="09:00" step="300" placeholder="00:00 AM">

<p id="description"></p>
<div id="console"></div>

<script>

description("This tests that input type: time is accessible on iOS.");

if (window.accessibilityController) {

var timeinput = accessibilityController.accessibleElementById("timeinput");
shouldBe("timeinput.description", "'AXLabel: (Between: 07:00 AM-09:00 AM)'");
shouldBeFalse("timeinput.isIgnored");
}

successfullyParsed = true;
</script>

<script src="../../resources/js-test-post.js"></script>
</body>
</html>

@@ -1,3 +1,17 @@
2015-11-09 Nan Wang <n_wang@apple.com>

AX: Input type: time is not accessible on iOS
https://bugs.webkit.org/show_bug.cgi?id=150984

Reviewed by Chris Fleizach.

Exposed input type: time as popup button on iOS.

Test: accessibility/ios-simulator/input-type-time.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

2015-11-09 Jiewen Tan <jiewen_tan@apple.com>

Null dereference loading Blink layout test editing/inserting/insert-html-crash-01.html
@@ -2553,9 +2553,9 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
return RadioButtonRole;
if (input.isTextButton())
return buttonRoleType();
// On iOS, the date field is a popup button. On other platforms this is a text field.
// On iOS, the date field and time field are popup buttons. On other platforms they are text fields.
#if PLATFORM(IOS)
if (input.isDateField())
if (input.isDateField() || input.isTimeField())
return PopUpButtonRole;
#endif

0 comments on commit fb9b96a

Please sign in to comment.