Skip to content

Commit 4457e4f

Browse files
mcking65github-actions[bot]
authored andcommitted
Generate .html source files with scripts automatically
1 parent f9b96c6 commit 4457e4f

6 files changed

+363
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<title>Text Input with aria-required Example</title>
7+
8+
<!-- js and css for this example. -->
9+
<link href="css/aria-required.css" rel="stylesheet">
10+
<script src="js/aria-required.js" type="text/javascript"></script>
11+
12+
<!-- Generated by process-test-directory.js -->
13+
<script>
14+
(function() {
15+
function setupScript(testPageDocument) {
16+
// setFocusAfterNotRequiredElement
17+
// Set aria-required attribute on the text input to "false"
18+
var input = testPageDocument.getElementById('imaginary-word');
19+
if (input) {
20+
input.setAttribute('aria-required', 'false');
21+
}
22+
// set focus on a link after the text input
23+
testPageDocument.querySelector('#afterlink').focus();
24+
25+
};
26+
document.addEventListener('click', function(event) {
27+
if (event.target.classList.contains('button-run-test-setup')) {
28+
event.target.disabled = true;
29+
setupScript(document);
30+
}
31+
});
32+
})();
33+
</script>
34+
<!-- End of generated output --></head>
35+
36+
<body>
37+
<main>
38+
<h1>Text Input with aria-required Example</h1>
39+
<p>
40+
The below example demonstrates a text input with the <code>aria-required</code> attribute.
41+
</p>
42+
<section>
43+
<div class="example-header">
44+
<h2 id="ex_label">Example</h2>
45+
</div>
46+
<div role="separator" id="ex_start_sep" aria-labelledby="ex_start_sep ex_label" aria-label="Start of"></div>
47+
<div id="ex1">
48+
<a id="beforelink" href="#beforelink">Navigate forwards from here</a>
49+
<label for="imaginary-word">Imaginary Word</label>
50+
<input type="text" id="imaginary-word" aria-required="true">
51+
<a id="afterlink" href="#afterlink">Navigate backwards from here</a>
52+
</div>
53+
<div role="separator" id="ex_end_sep" aria-labelledby="ex_end_sep ex_label" aria-label="End of"></div>
54+
</section>
55+
56+
<!-- Generated by process-test-directory.js -->
57+
<div style="position: relative; left: 0; right: 0; height: 2rem;">
58+
<button class="button-run-test-setup" autofocus style="height: 100%; width: 100%;">Run Test Setup</button>
59+
</div>
60+
<!-- End of generated output --></main>
61+
</body>
62+
63+
</html>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<title>Text Input with aria-required Example</title>
7+
8+
<!-- js and css for this example. -->
9+
<link href="css/aria-required.css" rel="stylesheet">
10+
<script src="js/aria-required.js" type="text/javascript"></script>
11+
12+
<!-- Generated by process-test-directory.js -->
13+
<script>
14+
(function() {
15+
function setupScript(testPageDocument) {
16+
// setFocusAfterRequiredElement
17+
// sets focus on a link after the button
18+
testPageDocument.querySelector('#afterlink').focus();
19+
20+
};
21+
document.addEventListener('click', function(event) {
22+
if (event.target.classList.contains('button-run-test-setup')) {
23+
event.target.disabled = true;
24+
setupScript(document);
25+
}
26+
});
27+
})();
28+
</script>
29+
<!-- End of generated output --></head>
30+
31+
<body>
32+
<main>
33+
<h1>Text Input with aria-required Example</h1>
34+
<p>
35+
The below example demonstrates a text input with the <code>aria-required</code> attribute.
36+
</p>
37+
<section>
38+
<div class="example-header">
39+
<h2 id="ex_label">Example</h2>
40+
</div>
41+
<div role="separator" id="ex_start_sep" aria-labelledby="ex_start_sep ex_label" aria-label="Start of"></div>
42+
<div id="ex1">
43+
<a id="beforelink" href="#beforelink">Navigate forwards from here</a>
44+
<label for="imaginary-word">Imaginary Word</label>
45+
<input type="text" id="imaginary-word" aria-required="true">
46+
<a id="afterlink" href="#afterlink">Navigate backwards from here</a>
47+
</div>
48+
<div role="separator" id="ex_end_sep" aria-labelledby="ex_end_sep ex_label" aria-label="End of"></div>
49+
</section>
50+
51+
<!-- Generated by process-test-directory.js -->
52+
<div style="position: relative; left: 0; right: 0; height: 2rem;">
53+
<button class="button-run-test-setup" autofocus style="height: 100%; width: 100%;">Run Test Setup</button>
54+
</div>
55+
<!-- End of generated output --></main>
56+
</body>
57+
58+
</html>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<title>Text Input with aria-required Example</title>
7+
8+
<!-- js and css for this example. -->
9+
<link href="css/aria-required.css" rel="stylesheet">
10+
<script src="js/aria-required.js" type="text/javascript"></script>
11+
12+
<!-- Generated by process-test-directory.js -->
13+
<script>
14+
(function() {
15+
function setupScript(testPageDocument) {
16+
// setFocusBeforeNotRequiredElement
17+
// Set aria-required attribute on the text input to "false"
18+
var input = testPageDocument.getElementById('imaginary-word');
19+
if (input) {
20+
input.setAttribute('aria-required', 'false');
21+
}
22+
// set focus on a link before the text input
23+
testPageDocument.querySelector('#beforelink').focus();
24+
25+
};
26+
document.addEventListener('click', function(event) {
27+
if (event.target.classList.contains('button-run-test-setup')) {
28+
event.target.disabled = true;
29+
setupScript(document);
30+
}
31+
});
32+
})();
33+
</script>
34+
<!-- End of generated output --></head>
35+
36+
<body>
37+
<main>
38+
<h1>Text Input with aria-required Example</h1>
39+
<p>
40+
The below example demonstrates a text input with the <code>aria-required</code> attribute.
41+
</p>
42+
<section>
43+
<div class="example-header">
44+
<h2 id="ex_label">Example</h2>
45+
</div>
46+
<div role="separator" id="ex_start_sep" aria-labelledby="ex_start_sep ex_label" aria-label="Start of"></div>
47+
<div id="ex1">
48+
<a id="beforelink" href="#beforelink">Navigate forwards from here</a>
49+
<label for="imaginary-word">Imaginary Word</label>
50+
<input type="text" id="imaginary-word" aria-required="true">
51+
<a id="afterlink" href="#afterlink">Navigate backwards from here</a>
52+
</div>
53+
<div role="separator" id="ex_end_sep" aria-labelledby="ex_end_sep ex_label" aria-label="End of"></div>
54+
</section>
55+
56+
<!-- Generated by process-test-directory.js -->
57+
<div style="position: relative; left: 0; right: 0; height: 2rem;">
58+
<button class="button-run-test-setup" autofocus style="height: 100%; width: 100%;">Run Test Setup</button>
59+
</div>
60+
<!-- End of generated output --></main>
61+
</body>
62+
63+
</html>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<title>Text Input with aria-required Example</title>
7+
8+
<!-- js and css for this example. -->
9+
<link href="css/aria-required.css" rel="stylesheet">
10+
<script src="js/aria-required.js" type="text/javascript"></script>
11+
12+
<!-- Generated by process-test-directory.js -->
13+
<script>
14+
(function() {
15+
function setupScript(testPageDocument) {
16+
// setFocusBeforeRequiredElement
17+
// sets focus on a link before the button
18+
testPageDocument.querySelector('#beforelink').focus();
19+
20+
};
21+
document.addEventListener('click', function(event) {
22+
if (event.target.classList.contains('button-run-test-setup')) {
23+
event.target.disabled = true;
24+
setupScript(document);
25+
}
26+
});
27+
})();
28+
</script>
29+
<!-- End of generated output --></head>
30+
31+
<body>
32+
<main>
33+
<h1>Text Input with aria-required Example</h1>
34+
<p>
35+
The below example demonstrates a text input with the <code>aria-required</code> attribute.
36+
</p>
37+
<section>
38+
<div class="example-header">
39+
<h2 id="ex_label">Example</h2>
40+
</div>
41+
<div role="separator" id="ex_start_sep" aria-labelledby="ex_start_sep ex_label" aria-label="Start of"></div>
42+
<div id="ex1">
43+
<a id="beforelink" href="#beforelink">Navigate forwards from here</a>
44+
<label for="imaginary-word">Imaginary Word</label>
45+
<input type="text" id="imaginary-word" aria-required="true">
46+
<a id="afterlink" href="#afterlink">Navigate backwards from here</a>
47+
</div>
48+
<div role="separator" id="ex_end_sep" aria-labelledby="ex_end_sep ex_label" aria-label="End of"></div>
49+
</section>
50+
51+
<!-- Generated by process-test-directory.js -->
52+
<div style="position: relative; left: 0; right: 0; height: 2rem;">
53+
<button class="button-run-test-setup" autofocus style="height: 100%; width: 100%;">Run Test Setup</button>
54+
</div>
55+
<!-- End of generated output --></main>
56+
</body>
57+
58+
</html>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<title>Text Input with aria-required Example</title>
7+
8+
<!-- js and css for this example. -->
9+
<link href="css/aria-required.css" rel="stylesheet">
10+
<script src="js/aria-required.js" type="text/javascript"></script>
11+
12+
<!-- Generated by process-test-directory.js -->
13+
<script>
14+
(function() {
15+
function setupScript(testPageDocument) {
16+
// setFocusOnNotRequiredElement
17+
// Set aria-required attribute on the text input to "false"
18+
var input = testPageDocument.getElementById('imaginary-word');
19+
if (input) {
20+
input.setAttribute('aria-required', 'false');
21+
}
22+
// set focus on the not required text input
23+
testPageDocument.querySelector('#imaginary-word').focus();
24+
25+
};
26+
document.addEventListener('click', function(event) {
27+
if (event.target.classList.contains('button-run-test-setup')) {
28+
event.target.disabled = true;
29+
setupScript(document);
30+
}
31+
});
32+
})();
33+
</script>
34+
<!-- End of generated output --></head>
35+
36+
<body>
37+
<main>
38+
<h1>Text Input with aria-required Example</h1>
39+
<p>
40+
The below example demonstrates a text input with the <code>aria-required</code> attribute.
41+
</p>
42+
<section>
43+
<div class="example-header">
44+
<h2 id="ex_label">Example</h2>
45+
</div>
46+
<div role="separator" id="ex_start_sep" aria-labelledby="ex_start_sep ex_label" aria-label="Start of"></div>
47+
<div id="ex1">
48+
<a id="beforelink" href="#beforelink">Navigate forwards from here</a>
49+
<label for="imaginary-word">Imaginary Word</label>
50+
<input type="text" id="imaginary-word" aria-required="true">
51+
<a id="afterlink" href="#afterlink">Navigate backwards from here</a>
52+
</div>
53+
<div role="separator" id="ex_end_sep" aria-labelledby="ex_end_sep ex_label" aria-label="End of"></div>
54+
</section>
55+
56+
<!-- Generated by process-test-directory.js -->
57+
<div style="position: relative; left: 0; right: 0; height: 2rem;">
58+
<button class="button-run-test-setup" autofocus style="height: 100%; width: 100%;">Run Test Setup</button>
59+
</div>
60+
<!-- End of generated output --></main>
61+
</body>
62+
63+
</html>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<title>Text Input with aria-required Example</title>
7+
8+
<!-- js and css for this example. -->
9+
<link href="css/aria-required.css" rel="stylesheet">
10+
<script src="js/aria-required.js" type="text/javascript"></script>
11+
12+
<!-- Generated by process-test-directory.js -->
13+
<script>
14+
(function() {
15+
function setupScript(testPageDocument) {
16+
// setFocusOnRequiredElement
17+
// sets focus on the required input
18+
testPageDocument.querySelector('#imaginary-word').focus();
19+
20+
};
21+
document.addEventListener('click', function(event) {
22+
if (event.target.classList.contains('button-run-test-setup')) {
23+
event.target.disabled = true;
24+
setupScript(document);
25+
}
26+
});
27+
})();
28+
</script>
29+
<!-- End of generated output --></head>
30+
31+
<body>
32+
<main>
33+
<h1>Text Input with aria-required Example</h1>
34+
<p>
35+
The below example demonstrates a text input with the <code>aria-required</code> attribute.
36+
</p>
37+
<section>
38+
<div class="example-header">
39+
<h2 id="ex_label">Example</h2>
40+
</div>
41+
<div role="separator" id="ex_start_sep" aria-labelledby="ex_start_sep ex_label" aria-label="Start of"></div>
42+
<div id="ex1">
43+
<a id="beforelink" href="#beforelink">Navigate forwards from here</a>
44+
<label for="imaginary-word">Imaginary Word</label>
45+
<input type="text" id="imaginary-word" aria-required="true">
46+
<a id="afterlink" href="#afterlink">Navigate backwards from here</a>
47+
</div>
48+
<div role="separator" id="ex_end_sep" aria-labelledby="ex_end_sep ex_label" aria-label="End of"></div>
49+
</section>
50+
51+
<!-- Generated by process-test-directory.js -->
52+
<div style="position: relative; left: 0; right: 0; height: 2rem;">
53+
<button class="button-run-test-setup" autofocus style="height: 100%; width: 100%;">Run Test Setup</button>
54+
</div>
55+
<!-- End of generated output --></main>
56+
</body>
57+
58+
</html>

0 commit comments

Comments
 (0)