File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 13
13
< h1 > auto-check-element</ h1 >
14
14
< h2 > Simple form</ h2 >
15
15
< p > Input 422 for an error response.</ p >
16
- < p id ="success1 " class ="success " hidden > Your submission was successful</ p >
16
+ < h2 tabindex =" -1 " id ="success1 " class ="success " hidden > Your submission was successful</ h2 >
17
17
< form >
18
18
< p > All fields marked with * are required</ p >
19
19
@@ -27,7 +27,7 @@ <h2>Simple form</h2>
27
27
28
28
< h2 > Form that has custom validity messages</ h2 >
29
29
< p > Input 422 for an error response.</ p >
30
- < p id ="success2 " class ="success " hidden > Your submission was successful</ p >
30
+ < h2 tabindex =" -1 " id ="success2 " class ="success " hidden > Your submission was successful</ h2 >
31
31
< form id ="custom ">
32
32
< p > All fields marked with * are required</ p >
33
33
@@ -42,7 +42,10 @@ <h2>Form that has custom validity messages</h2>
42
42
43
43
< script >
44
44
let successN = new URL ( window . location ) . searchParams . get ( 'form' )
45
- if ( successN ) document . getElementById ( `success${ successN } ` ) . hidden = false
45
+ if ( successN ) {
46
+ document . getElementById ( `success${ successN } ` ) . hidden = false
47
+ document . getElementById ( `success${ successN } ` ) . focus ( )
48
+ }
46
49
let focusedInput
47
50
const nativeFetch = window . fetch
48
51
const fakeFetch = function ( _ , options ) {
You can’t perform that action at this time.
0 commit comments