2021-02-17 13:00:45 +00:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
|
|
<html>
|
|
|
|
<head>
|
2021-03-01 21:09:47 +00:00
|
|
|
<script src="../../resources/js-test-pre.js"></script>
|
2021-02-17 13:00:45 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<label for="startTime">Please enter a start time for the meeting: </label>
|
|
|
|
<input aria-errormessage="errorMessage1 errorMessage2" id="startTime" type="text" value="" aria-invalid="false">
|
2021-03-01 21:09:47 +00:00
|
|
|
<span id="errorMessage1" aria-live="off" style="visibility:hidden">Invalid meeting time!</span>
|
2021-02-17 13:00:45 +00:00
|
|
|
<span id="errorMessage2" aria-live="off" style="visibility:hidden">The meeting time must be between 9:00 AM and 5:00 PM.</span>
|
|
|
|
<input type="submit" id="submitButton">
|
|
|
|
|
|
|
|
<p id="description"></p>
|
|
|
|
<div id="console"></div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
description("This verifies the exposure of aria-errormessage.");
|
|
|
|
|
|
|
|
if (window.accessibilityController) {
|
2021-03-01 21:09:47 +00:00
|
|
|
document.getElementById("errorMessage1").style.visibility = "visible";
|
|
|
|
document.getElementById("errorMessage2").style.visibility = "visible";
|
|
|
|
|
2021-02-17 13:00:45 +00:00
|
|
|
axStartTime = accessibilityController.accessibleElementById("startTime");
|
|
|
|
errorMessages = axStartTime.errorMessageElements();
|
|
|
|
shouldBe("errorMessages.length", "2");
|
2021-03-01 21:09:47 +00:00
|
|
|
shouldBe("errorMessages[0].description", "'AXLabel: Invalid meeting time!'");
|
|
|
|
shouldBe("errorMessages[1].description", "'AXLabel: The meeting time must be between 9:00 AM and 5:00 PM.'");
|
2021-02-17 13:00:45 +00:00
|
|
|
}
|
|
|
|
</script>
|
2021-03-01 21:09:47 +00:00
|
|
|
<script src="../../resources/js-test-post.js"></script>
|
2021-02-17 13:00:45 +00:00
|
|
|
</body>
|
|
|
|
</html>
|