ReviewOS

also looking at this

loghqorg/loghq

chore(release): promote UI, accessibility, and STX updates to production

#11
Merged glennmichael123 wants to merge main into production
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.

resources/views/forgot-password.stxmodified+1-1
Changes to resources/views/forgot-password.stx
@@ -53,7 +53,7 @@ const action = async ({ form }: { form: Record<string, string | string[]> }) =>
5353 </div>
5454
5555 @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">
5757 If an account exists for that email, a reset link is on its way. It expires in 60 minutes.
5858 </div>
5959 <p class="mt-6 text-center text-sm text-subtle">
resources/views/register.stxmodified+4-4
Changes to resources/views/register.stx
@@ -95,21 +95,21 @@ async function onRegister(e: Event): Promise<void> {
9595 <p class="mb-3.5 invite-hint">You've been invited to a project — sign up to join it.</p>
9696 @endif
9797
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>
9999
100100 {{-- A same-origin fetch, not a native POST — the submit is intercepted. --}}
101101 <form action="/api/auth/register" method="POST" @submit="onRegister" class="space-y-4">
102102 <div>
103103 <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' : ''">
105105 </div>
106106 <div>
107107 <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' : ''">
109109 </div>
110110 <div>
111111 <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' : ''">
113113 </div>
114114
115115 <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>
resources/views/reset-password.stxmodified+3-3
Changes to resources/views/reset-password.stx
@@ -85,16 +85,16 @@ const action = async ({ form }: { form: Record<string, string | string[]> }) =>
8585 <input type="hidden" name="token" value="{⁠{ linkToken }}">
8686 <input type="hidden" name="email" value="{⁠{ linkEmail }}">
8787 @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>
8989 @endif
9090
9191 <div>
9292 <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>
9494 </div>
9595 <div>
9696 <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>
9898 </div>
9999
100100 {{-- A plain button; no client mutation to bind a loading state to. --}}