Put Settings on NLDD's form system #201
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "settings-nldd-forms-impl"
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?
Every Settings panel expressed a field, a label, a hint and an error in its own way. This gives them one shape, taken from the design system.
The shape
plus one panel-level error surface,
<nldd-banner variant="critical" :text="error" />.Three rules make that a single skeleton rather than a family of them. The label lives in
labelon the field, never a sibling<p>and never a<label for>pointing at a custom element. The hint lives innldd-form-field-help-textas a child of the field. Errors are panel-level and go throughnldd-banner, which setsrole="alert"andaria-atomicitself instead of four panels spelling it out in three different ways.Defects this fixed along the way
aria-describedbypointing at an id on annldd-checkbox-fieldhost; an IDREF cannot cross a shadow boundary, so nothing was ever announced. PreferencesPanel usedsupporting-label, which renders inside the shadow root with no ARIA pointing at it. Ashelp-textchildren,form-field.jswrites the describedby itself.usePutSettingshas noonErrorand there is no submit button. It now has a permanently mountedrole="status"region and a critical banner. That surfaced a second bug:saveThemeapplied the theme before the PUT resolved and the theme store persists tolocalStoragewith no revert, so a failure would have said "Opslaan mislukt" while the app was already re-themed.aria-label="Toepassen: theme"while the visible label read "Toepassen: Thema" (WCAG 2.5.3).nldd-checkbox-field>nldd-checkbox>input), so the one-level query returnednull.spellcheckis not a declared prop onnldd-text-field; it rendersspellcheckfromnoSpellcheck.<p>and again asaccessible-label.Costs, stated rather than patched around
form-fieldforwards onlylabeltoaccessible-label, so "Basis-URL (optioneel)" becomes "Basis-URL" plus a visual badge. The label has no parts and no slot, so there is no supported way to add the word back.optional-label="(optioneel)"is not a fallback. Accept it or drop that edit.<strong>.labelis a plain string attribute. If the bold is judged essential for a destructive confirmation, drop that edit rather than splitting the sentence acrosslabelandsupporting-label.textattribute, sorole="alert"is no longer asserted anywhere in the suite. The stub does not boot, so there is nothing to assert against.Verified
vue-tscclean, 540 tests green on a cold vite cache (rm -rf node_modules/.vite), build green, eslint 0 errorsform-fieldheader collapses to zero height, and the reserved status strip is not distracting when idlePreferencesPanelgets the unit test it never had: status region, failure banner, and both save handlers.Deliberately out of scope
Field-level error association (422 -> Token, 409 -> Basis-URL) and converting ImportPanel's recovery-key field. Both were proposed and both were refuted on mechanism:
form-field.jscomputesshouldShow = isInvalid && referencedIds.includes(el.id), so withouterror-message="<id>"plus a matchingidthe message renders invisible and no describedby reaches the input. The status-only error computed also returnsnullfor a network failure, which would fail silently where today it says "Opslaan mislukt." Both are worth doing with that correction; neither belongs in this PR.Also out:
nldd-form(no submit anywhere in Settings),nldd-form-section(renders its title as a<legend>, skipped by heading navigation and re-announced on every field entry), andnldd-segmented-controlfor Thema (fits on the merits, but would leave Sync-interval a dropdown - a product decision across all Settings choice controls at once).8e20bd88b24fce37613e