Mark required fields consistently and accessibly #682
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
security
technical improvement
UX Improvement
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
local-it/mitgliederverwaltung#682
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation
<.input>marks a required field with a red asterisk after the label; the asterisk is hidden from screen readers and the field carriesaria-required(lib/mv_web/components/form.ex). No form explains what the asterisk means, and forms mark required fields only, never optional ones. DESIGN_GUIDELINES §6.3 asks for a consistent indicator plus accessible text. Checked onmain777fc938.Decision to make
The sources disagree:
Options:
aria-required, and add one "* required field" note per form;Mila mixes mostly-optional forms (member) and mostly-required forms (settings); count required and optional fields per form before deciding.
Scope
lib/mv_web/components/form.ex(all<.input>variants), every form, the component showcase, and DESIGN_GUIDELINES §6.3. Measure the contrast of the marker in both themes.Acceptance criteria
Dependencies
Scope extension (planning, 2026-11-19): #682 touches every form and the
<.input>component anyway. Two more form-wide problems belong into the same change, so the forms are reworked once:1. Submit buttons flicker on fast saves. Every submit button swaps its label while the form is sent (
phx-disable-with, "Save" → "Saving..."). On a fast save the user sees a ~35 ms flash and the button grows (113 → 129 px on the data field page, Firefox 1280 px), then jumps back. DESIGN_GUIDELINES §5.6 requiresphx-disable-with, so this happens in about 18 places.phx-submit-loading; (B) delayed label swap with reserved width; (C) label swap only for long-running actions. GOV.UK prevents double submit without a label change.app.css), all call sites moved, §5.6 updated;aria-busyor a polite live message when it takes a while.2. Field borders are too faint. Checkbox and text input borders measure about 1.5:1 against the background app-wide (WCAG 1.4.11 asks 3:1 for the boundary of a control; only the radio was raised in #669). Raise them in the shared component/theme tokens, light and dark, and measure all
<.input>variants.Additional acceptance criteria:
phx-disable-withleft inlib/unless DESIGN_GUIDELINES names the exception.<.input>variant has a control boundary of at least 3:1 in light and dark (measured values in the PR).