LEARN. PRACTICE. EXPLAIN.
Learning paths & interview practiceP
← Build an authenticated dashboard
BUILD → VERIFY → EXPLAIN · STEP 1 OF 6

Build an accessible login form

Validate credentials and help a learner recover from mistakes.

UNDERSTAND

Bring these concepts with you

BUILD

Your implementation

  1. Download all starter files into one folder. Run node server.mjs and open http://127.0.0.1:3211. Use Node.js 22.12+ and fake credentials; no packages are needed.
  2. Review the supplied HTML labels and error descriptions. Implement validateCredentials for lowercase usernames and 12–128 character demo passwords.
  3. Use the provided submit wiring to show inline errors, set aria-invalid, and focus the first invalid field. Submit with Enter and register a disposable account after later steps work.
export function validateCredentials(id, password) {
  // Return { id: message, password: message } for invalid fields.
  return {}
}
Need a hint?
  • Keep field validation messages attached through aria-describedby. A placeholder does not replace a label.
  • The server validates independently. Client checks help users but do not authorize a request.

Saved on this device · 0 / 6000 · Do not include passwords or private data.

VERIFY

Acceptance checks

From the folder containing your downloaded files, run:

node checks.mjs ./starter.mjs 1

This runs checks up to this step. Earlier steps must work first. Mark each result only after checking your implementation; the website does not run or grade it.

Record your attempt to enable the checklist and reference comparison.

Compare with the reference

Attempt the step first, then compare decisions and behavior. There can be more than one correct implementation.

EXPLAIN

Your interviewer asks

How do you make validation useful for screen-reader and keyboard users?

Say your answer aloud, then record the trade-offs and evidence in your notes above.

LOCAL VOICE REHEARSAL

Rehearse your step walkthrough aloud

Target pacing: 02:00 · Stays in this browser only; never uploaded.

00:00/ 02:00
AlifBay Prep