FE10: Capstone: three frontend projects for Kirana Express

Lesson 2 of 5 · reading 15–25 minutes; practice and project time is on the module page

Project 1: an accessible component set from a design

🎯You'll be able to

Turn a set of inaccessible components into an accessible, tested set.

🏠The everyday picture

A furniture maker turns a drawing into chairs that must also be sturdy, comfortable and safe for children. A developer turns a design file into components that must also work by keyboard, screen reader and touch.

📘What it really is

📝A worked example

A learner's component checks (illustrative; the test counts are the kit's):

Component Keyboard Screen reader Contrast Kit tests
Button ✓ ✓ ("Add salt to cart, button") 7.1:1 5
TextField ✓ ✓ (label, hint, error announced) 5.9:1 5
Select and Checkbox ✓ (native) ✓ 5.9:1; border 3.4:1 2
Dialog ✗ first: focus didn't return ✓ — 4
Toast ✓ ✓ (polite live region) 6.2:1 4

The Dialog failure showed up in the kit's focus-return test; the learner fixed the component, not the test.

🌍Where it's used

📝Case scenario

The design file has no focus style, and the designer is unavailable. The learner proposes a 3 px brand-coloured outline with an offset, checks its contrast against every background, documents it in the stories, and sends it to the designer for approval rather than leaving focus invisible.

🖱️Try it

Fix the six components in the kit's components/ui/ until npm run test:components and the axe scan of /components pass, then record a manual keyboard and screen reader check in a table like the one above.

⚠️Common mistakes

🛠️For your project

Project 1: fix the components in components/ui/ until the 20 tests in tests/components/ and the axe scan of /components pass.

✅Quick check

Which states are commonly missing from design files and need asking about?

Show the answer

Focus and error states (and often loading and disabled).

How should a toast notification behave for screen reader users?

Show the answer

It should be announced through a live region without stealing focus, and stay long enough to read.

← PreviousPlanning the capstone
ProLearners Assist