Skip to content

Give the auth inputs the design system's input class - #54

Merged
malinfossum merged 4 commits into
mainfrom
fix/auth-input-class
Aug 25, 2026
Merged

Give the auth inputs the design system's input class#54
malinfossum merged 4 commits into
mainfrom
fix/auth-input-class

Conversation

@malinfossum

Copy link
Copy Markdown
Member

Closes the 32px auth-input item in docs/backlog.md, open since Plan 4.

The change

class="input" on eight text inputs across five files — js/auth/{register,login,forgot,reset,verify}/view.js. No CSS was written. design-system/ is untouched.

They carried no class at all, so no design-system input styling ever reached them and they computed min-height: auto. That is also why DS 2.0.2's 44px control floor went straight past them: a floor cannot apply to a selector nothing matches. A min-height override in .auth-form would have produced the right number and left the real cause in place.

Measured, not assumed

Against the running app (dotnet run), at two viewports:

Screen Field Before After
register reg-name, reg-email, reg-password 31.59px 51.59px (min-height: 44px)
login login-email, login-password 31.59px 51.59px
forgot-password forgot-email 31.59px 51.59px
reset-password reset-password 31.59px 51.59px
verify (expired-link state) verify-email 31.59px 51.59px

375×812 → 311px wide; 1280×900 → 480px wide inside the 576px card. The submit buttons were already 44px and are unchanged.

Behaviour check: a scripted login with wrong credentials still renders the generic "That email address and password don't match an account.", moves focus to the .auth-errors alert, announces through #status, and the fields stay 51.59px in the error state.

⚠️ It trades one gap for another — please weigh in

The design system's field is a --surface-2 fill inside a 1px --border edge on a --page-bg page:

  • fill vs page 1.09:1, border vs page 1.34:1
  • WCAG 2.2 SC 1.4.11 (AA) asks 3:1 for the visual information needed to identify a control
  • the browser default these fields had before was a 2px #858585 inset border at 5.13:1 — which the SC exempts because it is user-agent styling; styling them ends that exemption

No border token in the system clears the bar (--border 1.34:1, --border-strong 1.69:1; --text-faint reaches 5.91:1 but is a text token). So the recommendation is an upstream control-boundary token in workbench, synced back the way the 42px floor was as DS 2.0.2 — not a local app.css override that would leave every other consumer wrong. Recorded as a new backlog entry with the numbers; not decided here.

Still identifying the field meanwhile: its visible label, the hint text, 16.09:1 text contrast inside the field, and a 2px --accent-strong focus ring at 9.15:1.

What to check

  • Eight inputs, five files, nothing but a class attribute added — git diff should be that and the two backlog entries.
  • No new CSS, no design-system/ edit, no min-height override anywhere.
  • Whether you agree the contrast finding belongs upstream rather than in css/app.css.

Not covered

No human pointer has touched these screens. The browser pane's synthetic clicks do not dispatch, so everything above is measurement plus scripted submission, and the pane would not composite, so there are no screenshots. A visual pass on a real browser is still owed — it was owed before this PR too.

dotnet test253 passed, 0 failed. This branch is frontend and docs only; it does not include the +2 tests from #53.

The eight text inputs across the five js/auth/*/view.js screens carried no
class at all, so no design-system input styling ever reached them and they
computed min-height: auto - 31.59px, under the 44x44 target this project
has held for nine plans. DS 2.0.2's control floor went straight past them
for the same reason, which is why the sync did not fix this.

class="input" is the whole change. No CSS was written, and design-system/
is untouched.

Measured against the running app, not assumed. At 375x812 every auth input
is now 311 x 51.59px with a computed min-height of 44px, against 31.59px
before; at 1280x900 they are 480 x 51.59px inside the 576px card. Register,
login, forgot-password, reset-password and verify all measured. A scripted
login with wrong credentials still renders the generic error, moves focus
to the alert, announces through #status, and leaves the fields at 51.59px.

It trades one accessibility gap for another, and the trade is recorded
rather than hidden. The design system's field is a --surface-2 fill inside
a 1px --border edge: 1.34:1 against the page, where WCAG 2.2 SC 1.4.11 asks
3:1 to identify a control. The browser default these fields had before was
5.13:1 - exempt from that SC as user-agent styling, and no longer exempt
now that we style them. No border token in the system clears 3:1
(--border-strong is 1.69:1), so the fix belongs upstream in workbench the
way the 42px floor did, not in a local override. New backlog entry carries
the numbers; the 32px entry is marked resolved.

No human pointer has touched these screens. The browser pane's synthetic
clicks do not dispatch, so every check above is measurement and scripted
submission, and the pane would not composite for screenshots - a visual
pass is still owed.

253/253 green (this branch is frontend and docs only).
Malin's call, 2026-08-21. The entry was written with the choice open; it
is not open any more, and a backlog entry that still reads as undecided
invites the same discussion twice.

The reason is worth keeping with it: the point of a shared design system
is that consumers stay in sync. An app.css override would fix Wend's auth
screens, leave every other consumer wrong, and give Wend a second source
of truth for a number the system already owns - the same argument that
sent the 42px floor upstream rather than into this repo.
@malinfossum
malinfossum merged commit cad4fe7 into main Aug 25, 2026
1 check passed
@malinfossum
malinfossum deleted the fix/auth-input-class branch August 25, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants