diff --git a/site/src/components/FormLayout.astro b/site/src/components/FormLayout.astro index a1dcf21..83ef6ec 100644 --- a/site/src/components/FormLayout.astro +++ b/site/src/components/FormLayout.astro @@ -22,5 +22,9 @@ interface Props extends HTMLAttributes<"form"> {} & input:not([type="checkbox"], [type="radio"]) { display: block; } + + & textarea { + width: 100%; + } } diff --git a/site/src/lib/client/form.ts b/site/src/lib/client/form.ts index c8f9a8c..bac25fe 100644 --- a/site/src/lib/client/form.ts +++ b/site/src/lib/client/form.ts @@ -2,7 +2,7 @@ import type { ZodObject, ZodRawShape } from "astro/zod"; /** Utility function for failure cases that disables all inputs/buttons in a form. */ export function disableInputs(form: HTMLFormElement) { - const inputSelectors = ["input", "select", "button"] as const; + const inputSelectors = ["input", "select", "textarea", "button"] as const; inputSelectors.forEach((selector) => form.querySelectorAll(selector).forEach((el) => (el.disabled = true)) ); diff --git a/site/src/lib/client/store.ts b/site/src/lib/client/store.ts index 9981f61..2ba0006 100644 --- a/site/src/lib/client/store.ts +++ b/site/src/lib/client/store.ts @@ -23,8 +23,12 @@ export const storeSchema = z.object({ hasDismissedCookieBanner: z.boolean().default(false), loggedInAt: z.string().datetime().nullable().default(null), registration: z.object({ + firstName: z.string().min(1), + middleName: z.string().optional(), + lastName: z.string().min(1), email: z.string().email(), password: z.string().min(1), + phone: z.string().regex(/^[\d -]+$/), }).nullable().default(null), }); export type Store = z.infer; diff --git a/site/src/pages/museum/register.astro b/site/src/pages/museum/register.astro index 15035c8..c57e981 100644 --- a/site/src/pages/museum/register.astro +++ b/site/src/pages/museum/register.astro @@ -19,12 +19,56 @@ import Layout from "@/layouts/Layout.astro"; fixed={{ role: "alert", tabindex: -1 }} /> + + + { + /** + * @break + * wcag2: + * - 1.4.3 + * - 1.4.6 + * wcag3: Text contrast sufficient (minimum) + * description: | + * The "did you mean" email prompt has insufficient contrast. + */ + /** + * @break + * wcag2: 4.1.3 + * wcag3: Error notifications available + * description: | + * The "did you mean" email prompt doesn't grab focus and isn't announced. + * discussionItems: + * - The message this displays can be confusing/misleading; does that fail any SC/requirement? + */ + } + +