fix: use form element for registration page
The formatter converted the register container from a div with onclick to a semantic form with onsubmit, improving accessibility and enabling native form submission behavior.
This commit is contained in:
parent
5a0321b226
commit
1075986554
1 changed files with 4 additions and 4 deletions
|
|
@ -29,10 +29,11 @@
|
||||||
(Chrome, Firefox, Safari, or Edge).
|
(Chrome, Firefox, Safari, or Edge).
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<form
|
||||||
id="register-form"
|
id="register-form"
|
||||||
class="mt-6 flex flex-col gap-4"
|
class="mt-6 flex flex-col gap-4"
|
||||||
data-token="{{ token }}"
|
data-token="{{ token }}"
|
||||||
|
onsubmit="event.preventDefault(); handleRegister()"
|
||||||
>
|
>
|
||||||
<label class="flex flex-col gap-1 text-sm">
|
<label class="flex flex-col gap-1 text-sm">
|
||||||
<span class="text-text">Display Name</span>
|
<span class="text-text">Display Name</span>
|
||||||
|
|
@ -61,8 +62,7 @@
|
||||||
|
|
||||||
<button
|
<button
|
||||||
id="register-button"
|
id="register-button"
|
||||||
type="button"
|
type="submit"
|
||||||
onclick="handleRegister()"
|
|
||||||
class="mt-2 inline-flex w-full items-center justify-center gap-2 rounded-md bg-accent px-4 py-3 text-sm font-semibold text-accent-text transition hover:bg-accent-hover disabled:opacity-50 disabled:cursor-not-allowed"
|
class="mt-2 inline-flex w-full items-center justify-center gap-2 rounded-md bg-accent px-4 py-3 text-sm font-semibold text-accent-text transition hover:bg-accent-hover disabled:opacity-50 disabled:cursor-not-allowed"
|
||||||
>
|
>
|
||||||
{{ icons::key("h-4 w-4") }} Register Passkey
|
{{ icons::key("h-4 w-4") }} Register Passkey
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
>
|
>
|
||||||
<p>Follow the prompts from the browser or device...</p>
|
<p>Follow the prompts from the browser or device...</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue