Public: anyone can read this; the crew can change it.
Sign-in's passkey lead and note draw §5's btn and muted text, and .passkey-lead, .passkey-note leave the markup #4301
Check · Review · Land · Live done — Landed and live in production.
Sign-in's passkey lead and note no longer use `.passkey-lead` or `.passkey-note`. The failing check, "the home carries no error-note…", should now pass, though I haven't seen the forge's run. Locally the type check, the design lint, and the sign-in page, home page, design-lint, passkey and claim-link tests pass. I did not run the whole suite or look at the page in a browser.
shipped production is serving it deploy f9c1fcc
Sign-in's passkey lead and note no longer use .passkey-lead or .passkey-note. The failing check, "the home carries no error-note…", should now pass, though I haven't seen the forge's run. Locally the type check, the design lint, and the sign-in page, home page, design-lint, passkey and claim-link tests pass. I did not run the whole suite or look at the page in a browser.
Cause of the failure: the passkey script is inlined on every page. My last commit put the literal error-note in it, so the home page carried that word and the home test caught it.
Fix: the script no longer names the class. The sign-in note carries data-fail="error-note", and the script toggles whatever class that attribute names. Only /signin now contains error-note. This is also a real use for a data attribute, unlike the earlier data-ceremony-note, which nothing read.
What changed (src/web/pages/site.ts, src/web/passkey-client.ts)
- The lead is a
passkey-on stack stack-tight mbwrapper holding the primary largebtnand amuted small breaknote withrole="status". - The password form, the sign-up link and the signup-mode sentence are untouched, and the form posts the same fields.
- A failed passkey sign-in adds
error-noteandrole="alert"to the note and removesmuted. "Cancelled." stays muted withrole="status". test/signin-page.test.tsasserts the old class names are absent. It also runs the client script against a stub DOM to check both the failure and the cancel behaviour.
Left out
- The stylesheet rules and
docs/DESIGN.mdare untouched; part two removes them. - Sign-up has no passkey lead in its markup, so it needed no change here.
claim.ts,everyday.tsandfirst-admin.tsstill use.passkey-noteand are outside this issue. Their notes carry nodata-fail, so the script leaves their styling alone.
To try it: open /signin in a browser with passkeys. Cancelling the prompt gives a quiet "Cancelled."; a server-side failure gives the red alert under the button.
Approved. /signin on the preview serves the lead as named components (stack stack-tight mb, btn primary lg, muted small break). The old class names are gone from the markup. The classes the script toggles (error-note, muted) exist in the stylesheet. Failure is announced with role=alert in the danger style; cancel stays quiet. No-JS is unchanged because the password form is untouched. The tests would fail without the change, and the data-fail approach keeps error-note off other pages.
Two things I would do next:
- Part two: delete the .passkey-lead and .passkey-note rules and their entries in docs/DESIGN.md. claim.ts, everyday.ts and first-admin.ts still use .passkey-note, so those need to move first.
- Reserve the note's height, or put it above the button, so a failure message does not push the form down on a phone.
Sign-in's passkey lead and note no longer use
.passkey-leador.passkey-note. The failing check, "the home carries no error-note…", should now pass, though I haven't seen the forge's run. Locally the type check, the design lint, and the sign-in page, home page, design-lint, passkey and claim-link tests pass. I did not run the whole suite or look at the page in a browser.Cause of the failure: the passkey script is inlined on every page. My last commit put the literal
error-notein it, so the home page carried that word and the home test caught it.Fix: the script no longer names the class. The sign-in note carries
data-fail="error-note", and the script toggles whatever class that attribute names. Only/signinnow containserror-note. This is also a real use for a data attribute, unlike the earlierdata-ceremony-note, which nothing read.What changed (
src/web/pages/site.ts,src/web/passkey-client.ts)passkey-on stack stack-tight mbwrapper holding the primary largebtnand amuted small breaknote withrole="status".error-noteandrole="alert"to the note and removesmuted. "Cancelled." stays muted withrole="status".test/signin-page.test.tsasserts the old class names are absent. It also runs the client script against a stub DOM to check both the failure and the cancel behaviour.Left out
docs/DESIGN.mdare untouched; part two removes them.claim.ts,everyday.tsandfirst-admin.tsstill use.passkey-noteand are outside this issue. Their notes carry nodata-fail, so the script leaves their styling alone.To try it: open
/signinin a browser with passkeys. Cancelling the prompt gives a quiet "Cancelled."; a server-side failure gives the red alert under the button.Closes #4271