Frontend Developer · Projects

Project 1: An accessible component set

Marking guide version 1 · Lessons: FE1 lessons 1 and 5, FE6 lessons 1–5, FE7 lesson 3, FE8 lessons 3 and 5, FE10 lesson 2

The problem and who it's for

Kirana Express's buttons, fields and dialogs were built quickly. A shopper who uses a keyboard can't open the slot picker, a screen reader reads the Pay button as "group", and the error messages are red text nobody hears. Every page uses these six components, so fixing them once fixes the whole shop.

Scope

Not included

Before you start

Starter files

Download everything at once: starter/frontend-starter.zip.

Milestones

  1. Run npm run test:components and note which of the 20 tests fail and why.
  2. Rebuild Button and TextField with native elements, labels, hints and linked errors.
  3. Rebuild Select and Checkbox with native elements, styled from the tokens.
  4. Rebuild Dialog (focus in, trapped, Escape closes, focus returns) and Toast (polite live region, no focus stealing).
  5. Run npm run build then npm run a11y until /components has no serious or critical findings.
  6. Do a keyboard-only and a screen reader pass of /components, and record what each component announces.

Expected outputs

Acceptance tests

# Input Expected result
1 npm run test:components 20 of 20 pass (Button 5, TextField 5, Select and Checkbox 2, Dialog 4, Toast 4)
2 npm run build, then npm run a11y, test for /components Passes: no serious or critical axe findings
3 Open the dialog on /components by keyboard, press Tab 10 times, then Escape Focus stays inside while open; Escape closes it; focus returns to the button that opened it
4 With a screen reader running, move to the PIN code field on /components (it shows an error) The field's name and its error are both announced
5 Zoom to 200% and view at 320 px wide No text is cut off and nothing needs sideways scrolling
6 npm run typecheck No errors

Failure and recovery exercises

  1. Remove the :focus-visible style from your Button and Tab through /components. Describe what a keyboard user experiences, then put it back.
  2. Make the Toast take focus when it appears, and type in a field while it shows. Explain the problem, then restore it.
  3. Change one test's expected text to make it pass without fixing the component. Run the axe scan and the keyboard check, and write down why changing the test hid a real problem. Then undo it.

Evidence to submit

Marking guide and self-check

Pass rule: every Safety-critical (S) and Mandatory (M) item must be met. A single unmet safety item means the project is not complete, whatever else is done. Quality items are for your own improvement.

Your answers are saved in this browser on this device. Self-checked means you checked your own work against this guide; it is not a reviewer's approval. Never paste passwords, keys, tokens or real customer data here.

Checklist (marking guide version 1)
Evidence

← PreviousAll projects
ProLearners Assist