also looking at this
chore(release): promote UI, accessibility, and STX updates to production
#11
16 files
+176
-67
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -53,7 +53,7 @@ const action = async ({ form }: { form: Record<string, string | string[]> }) => | ||
| 53 | 53 | </div> |
| 54 | 54 | |
| 55 | 55 | @if (sent) |
| 56 | <div class="px-3 py-3 text-sm rounded-lg ok-box"> | |
| 56 | <div role="status" class="px-3 py-3 text-sm rounded-lg ok-box"> | |
| 57 | 57 | If an account exists for that email, a reset link is on its way. It expires in 60 minutes. |
| 58 | 58 | </div> |
| 59 | 59 | <p class="mt-6 text-center text-sm text-subtle"> |
| @@ -95,21 +95,21 @@ async function onRegister(e: Event): Promise<void> { | ||
| 95 | 95 | <p class="mb-3.5 invite-hint">You've been invited to a project — sign up to join it.</p> |
| 96 | 96 | @endif |
| 97 | 97 | |
| 98 | <div :show="!!error()" :text="error()" class="mb-4 px-3 py-2 text-sm rounded-lg err-box"></div> | |
| 98 | <div id="form-error" role="alert" :show="!!error()" :text="error()" class="mb-4 px-3 py-2 text-sm rounded-lg err-box"></div> | |
| 99 | 99 | |
| 100 | 100 | {{-- A same-origin fetch, not a native POST — the submit is intercepted. --}} |
| 101 | 101 | <form action="/api/auth/register" method="POST" @submit="onRegister" class="space-y-4"> |
| 102 | 102 | <div> |
| 103 | 103 | <label for="register-name" class="block mb-1.5 font-medium text-muted text-xs">Name</label> |
| 104 | <input id="register-name" name="name" type="text" required autocomplete="name" placeholder="Ada Lovelace" :model="name" class="px-3.5 py-2.5 w-full text-sm field"> | |
| 104 | <input id="register-name" name="name" type="text" required autocomplete="name" placeholder="Ada Lovelace" :model="name" class="px-3.5 py-2.5 w-full text-sm field" :aria-invalid="error() ? 'true' : 'false'" :aria-describedby="error() ? 'form-error' : ''"> | |
| 105 | 105 | </div> |
| 106 | 106 | <div> |
| 107 | 107 | <label for="register-email" class="block mb-1.5 font-medium text-muted text-xs">Email</label> |
| 108 | <input id="register-email" name="email" type="email" required autocomplete="email" placeholder="you@example.com" :model="email" {{ invitedEmail ? 'readonly' : '' }} class="px-3.5 py-2.5 w-full text-sm field"> | |
| 108 | <input id="register-email" name="email" type="email" required autocomplete="email" placeholder="you@example.com" :model="email" {{ invitedEmail ? 'readonly' : '' }} class="px-3.5 py-2.5 w-full text-sm field" :aria-invalid="error() ? 'true' : 'false'" :aria-describedby="error() ? 'form-error' : ''"> | |
| 109 | 109 | </div> |
| 110 | 110 | <div> |
| 111 | 111 | <label for="register-password" class="block mb-1.5 font-medium text-muted text-xs">Password</label> |
| 112 | <input id="register-password" name="password" type="password" required autocomplete="new-password" placeholder="At least 8 characters" :model="password" class="px-3.5 py-2.5 w-full text-sm field"> | |
| 112 | <input id="register-password" name="password" type="password" required autocomplete="new-password" placeholder="At least 8 characters" :model="password" class="px-3.5 py-2.5 w-full text-sm field" :aria-invalid="error() ? 'true' : 'false'" :aria-describedby="error() ? 'form-error' : ''"> | |
| 113 | 113 | </div> |
| 114 | 114 | |
| 115 | 115 | <button type="submit" :disabled="loading()" :text="loading() ? 'Creating account…' : 'Create account'" class="py-2.5 w-full font-semibold text-sm btn-solid">Create account</button> |
| @@ -85,16 +85,16 @@ const action = async ({ form }: { form: Record<string, string | string[]> }) => | ||
| 85 | 85 | <input type="hidden" name="token" value="{{ linkToken }}"> |
| 86 | 86 | <input type="hidden" name="email" value="{{ linkEmail }}"> |
| 87 | 87 | @if (formError) |
| 88 | <div class="px-3 py-2 text-sm rounded-lg err-box">{{ formError }}</div> | |
| 88 | <div id="form-error" role="alert" class="px-3 py-2 text-sm rounded-lg err-box">{{ formError }}</div> | |
| 89 | 89 | @endif |
| 90 | 90 | |
| 91 | 91 | <div> |
| 92 | 92 | <label for="reset-password" class="block mb-1.5 font-medium text-muted text-xs">New password</label> |
| 93 | <input id="reset-password" name="password" type="password" required minlength="8" autocomplete="new-password" placeholder="At least 8 characters" class="px-3.5 py-2.5 w-full text-sm field"> | |
| 93 | <input id="reset-password" name="password" type="password" required minlength="8" autocomplete="new-password" placeholder="At least 8 characters" class="px-3.5 py-2.5 w-full text-sm field" aria-invalid="{{ formError ? 'true' : 'false' }}"@if (formError) aria-describedby="form-error"@endif> | |
| 94 | 94 | </div> |
| 95 | 95 | <div> |
| 96 | 96 | <label for="reset-password-confirmation" class="block mb-1.5 font-medium text-muted text-xs">Confirm new password</label> |
| 97 | <input id="reset-password-confirmation" name="password_confirmation" type="password" required minlength="8" autocomplete="new-password" placeholder="Repeat the password" class="px-3.5 py-2.5 w-full text-sm field"> | |
| 97 | <input id="reset-password-confirmation" name="password_confirmation" type="password" required minlength="8" autocomplete="new-password" placeholder="Repeat the password" class="px-3.5 py-2.5 w-full text-sm field" aria-invalid="{{ formError ? 'true' : 'false' }}"@if (formError) aria-describedby="form-error"@endif> | |
| 98 | 98 | </div> |
| 99 | 99 | |
| 100 | 100 | {{-- A plain button; no client mutation to bind a loading state to. --}} |