1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
content / test / data / accessibility / html / form-validation-message-removed-after-error-corrected.html [blame]
<!--
# TODO(accessibility) Invalid state should not appear after required field is
# filled, but does. This only occurs in the test, not in a real browser.
# For now, don't check invalid state in this test.
@BLINK-DENY:invalidState*
@WAIT-FOR:done
-->
<!-- Ensure that alert is removed after form is made valid-->
<!DOCTYPE html>
<form>
<label for="in1">Pet name:</label><input id="in1" required>
</form>
<script>
const in1 = document.querySelector('input');
in1.setCustomValidity('Please enter pet name');
in1.reportValidity();
setTimeout(() => {
in1.blur();
in1.value = 'ready';
document.title = 'done';
}, 100);
</script>