Skip to content

Commit 8bfe850

Browse files
committed
fix basic axe violations on example page
1 parent 4e56282 commit 8bfe850

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

examples/index.html

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
<!doctype html>
2-
<html>
1+
<!DOCTYPE html>
2+
<html lang="en">
33
<head>
44
<title>&lt;auto-check&gt; element</title>
5-
<style>auto-check {display: block;}</style>
5+
<style>
6+
auto-check {
7+
display: block;
8+
}
9+
</style>
610
</head>
711
<body>
812
<h1>Simple form</h1>
913
<p>Input 422 for an error response.</p>
1014
<form>
15+
<label for="simple-field">Input</label>
1116
<auto-check csrf="foo" src="/demo" required>
12-
<input autofocus name="foo" required>
17+
<input id="simple-field" autofocus name="foo" required />
1318
<code class="state"></code>
1419
</auto-check>
1520
<button>submit</button>
@@ -18,8 +23,9 @@ <h1>Simple form</h1>
1823
<h1>Form that has custom validity messages</h1>
1924
<p>Input 422 for an error response.</p>
2025
<form id="custom">
26+
<label for="custom-field">Input</label>
2127
<auto-check csrf="foo" src="/demo" required>
22-
<input autofocus class="json" name="foo" required>
28+
<input id="custom-field" autofocus class="json" name="foo" required />
2329
<code class="state"></code>
2430
</auto-check>
2531
<button>submit</button>
@@ -28,7 +34,7 @@ <h1>Form that has custom validity messages</h1>
2834
<script>
2935
let focusedInput
3036
const nativeFetch = window.fetch
31-
const fakeFetch = function(_, options) {
37+
const fakeFetch = function (_, options) {
3238
const path = `https://httpbin.org/status/${options.body.get('value') === '422' ? '422' : '200'}`
3339
return nativeFetch(path, options)
3440
}

0 commit comments

Comments
 (0)