Product EngineeringVol. 15 · Part XV
0 / 0

Shelves / Product Engineering

PE·184

UX Fundamentals

The design principles engineers implement every day: conceptual models, affordances, signifiers, mapping and constraints (Don Norman), Nielsen's usability heuristics, information architecture with card sorting, tree testing, navigation and labelling, discoverability and progressive disclosure, cognitive load with Hick's and Fitts's laws computed, feedback and response-time thresholds (optimistic UI, skeletons, progress), consistency and design systems, accessibility from first principles (WCAG 2.2's POUR principles, contrast ratios computed, target sizes, keyboard and focus, semantic HTML and ARIA, screen readers, accessible forms in React, native semantics in Android and iOS, testing), error prevention, error messages and recovery (undo implemented with commands), dark patterns to refuse, localisation for Indian users (Intl formatting, scripts, right-to-left), and performance as UX (Core Web Vitals).

30 topics · ~22 min read · 30-question quiz
Updated Suggest a correction

Start here: designing for how people actually behave

UX (user experience) fundamentals are a small set of well-tested facts about people: they scan rather than read, they can hold only a few things in mind, they need to see that something happened, they make predictable mistakes, and many use a keyboard, a screen reader, a small screen, a slow network or a second language. Engineers make dozens of UX decisions in every feature (labels, error messages, loading states, focus order) whether or not a designer is involved.

A handful of rules that prevent most problems

  • Visible feedback: respond within about 0.1 s ("Skipping…"); show progress for anything over about 1 s; say clearly when it's done.
  • Clear labels and plain words: "Skip Tuesday" beats "Submit"; errors say what happened and how to fix it.
  • Prevent errors rather than report them: offer only valid days; confirm destructive actions; allow undo.
  • Consistency: same words, same positions, same patterns everywhere (a design system helps).
  • Accessibility: real buttons and labels, enough contrast, keyboard access, text alternatives for images, meaning not carried by colour alone.

The same form, built two ways

The lab built a "skip a delivery" form twice and audited both with axe-core (the most widely used automated accessibility checker) in a real browser:

Careless version Careful version
automated violations 8 rules, 17 elements 0
text contrast 2.85:1 (grey on white) 15.8:1
button a styled <div>, 35 × 22 px, unreachable by keyboard a <button>, 136 × 44 px
feedback after pressing nothing for 2.5 s, then a red dot "Skipping…" at once, then "Tuesday skipped. You won't be charged."

The careless version isn't unusual; it's what copying a mock-up without thinking produces. Note too what the automated tool didn't flag: the keyboard-unreachable button and the colour-only red dot. Automated checks catch part of the problem; testing with a keyboard and a screen reader catches more.

How deep to go in UX fundamentals

Volume 17 defines six mastery levels; for UX fundamentals they look like this:

Level You can…
L1 name Norman's principles, Nielsen's heuristics and core accessibility rules
L2 build accessible, well-labelled forms with clear feedback and errors
L3 apply information architecture, cognitive load and response-time principles to designs
L4 audit a product with automated tools, keyboard and screen readers, and fix what you find
L5 shape a design system and UX quality bar for a product area
L6 lead accessibility and UX quality programmes, including compliance and measurement

Why engineers need UX fundamentals

Designers specify much of the experience, but engineers decide whether it actually feels right: loading states, error handling, keyboard behaviour, focus management, accessibility semantics, performance on slow phones, what happens when the network drops mid-action. Most UX failures users meet in practice are implementation details, not visual design.

Mental models and Norman's principles

Users build a mental model of how a system works; designers hold a conceptual model; the system image (what the UI shows and does) is the only bridge between them. Don Norman's The Design of Everyday Things gives the vocabulary:

Principle Meaning TiffinBox example
Affordance What actions an object makes possible (a relationship between object and user) A meal card can be tapped, swiped, long-pressed
Signifier A perceivable cue that shows where and how to act A visible "Skip" button with an icon and label, not a hidden swipe
Mapping Relationship between controls and their effects Day toggles laid out Mon–Fri left to right like a calendar
Constraints Limits that prevent wrong actions Days after the cut-off are disabled with an explanation
Feedback Immediate, informative response to every action "Wednesday skipped · 1 credit added · Undo"
Conceptual model A simple, coherent explanation of how things work "Each skipped meal becomes a credit that pays for a future meal"

Two gulfs explain most confusion: the gulf of execution (users can't figure out how to do what they want) and the gulf of evaluation (they can't tell what happened). Signifiers and mapping bridge the first; feedback bridges the second.

usergoal: skip Wednesday systemdelivery schedule gulf of execution: where is skip? how? gulf of evaluation: did it work? was I charged? bridge with signifiers · mapping · constraints bridge with feedback · visible state · undo
The two gulfs of interaction. On the execution side, a user forms a goal, plans an action and must find the control that performs it; unclear signifiers widen this gulf. On the evaluation side, the system changes state and the user must perceive and interpret what happened; missing feedback widens this gulf. Good design narrows both.

Nielsen's ten usability heuristics

  1. Visibility of system status: keep users informed (delivery status, sync state).
  2. Match between system and the real world: users' language and concepts ("lunch", "credit"), not internal jargon ("order entity", "ledger adjustment").
  3. User control and freedom: undo, cancel, back; emergency exits.
  4. Consistency and standards: follow platform conventions and your design system.
  5. Error prevention: design out errors before messaging them.
  6. Recognition rather than recall: show options; don't make users remember codes or steps.
  7. Flexibility and efficiency of use: shortcuts for experts (recurring skips), simplicity for novices.
  8. Aesthetic and minimalist design: every extra element competes with relevant ones.
  9. Help users recognise, diagnose and recover from errors: plain-language messages with a way forward.
  10. Help and documentation: searchable, task-focused, in context.

A heuristic evaluation (3–5 evaluators independently reviewing a flow against these heuristics, then merging findings with severity ratings) is a cheap complement to usability testing (chapter 182).

Information architecture

Information architecture (IA) is how content and functionality are organised, labelled and navigated so people can find things and understand where they are.

  • Organisation schemes: by task (plan, skip, pay), by object (meals, plans, invoices), by audience (individuals, office admins), chronological (this week, next week).
  • Labelling: users' words; consistent; specific ("Skip a day" beats "Manage").
  • Navigation: global (tab bar), local (within a section), contextual (links in content), utility (account, help). Mobile apps: 3–5 primary destinations in a bottom bar.
  • Search for large content sets, with good empty states and suggestions.
  • Hierarchy depth vs breadth: flatter is usually easier when labels are clear.

Methods:

  • Card sorting: participants group items (open: they name groups; closed: predefined groups) to reveal their mental model.
  • Tree testing: participants find items in a text-only hierarchy, measuring success and directness before any visual design.
  • First-click testing: where do users click first for a task? First-click correctness strongly predicts task success.
app Home Plan Menu Account today's mealcredit balancetrack delivery week plannerskip a daypause plan this weekratingsdietary filters plan & billinginvoices (GST)help tree test: 9/10 found "skip" under Plan; 3/10 under Account in the old IA
An information architecture for the TiffinBox app. Four primary destinations in the tab bar — Home, Plan, Menu and Account — each with a few second-level screens organised by user tasks. Skipping and the week planner live under Plan, where users look for them in tree tests, rather than being buried in Account settings.

Discoverability and progressive disclosure

Discoverability: can users find what's possible? Hidden gestures, icon-only buttons and features buried in menus fail it. Make primary actions visible, label icons, and use onboarding sparingly (people skip tours; contextual hints at the moment of need work better).

Progressive disclosure: show what most users need now; reveal advanced options when asked ("Skip tomorrow" visible; "Skip a range / recurring pattern" behind "More options"). Reduces cognitive load without removing power.

Cognitive load

Working memory is limited (the oft-quoted "7 ± 2" is better read as "a few chunks"). Reduce extraneous load so users spend effort on their task:

  • Chunking and grouping: related fields together; visual hierarchy.
  • Recognition over recall: show previous choices, defaults, recent items.
  • Sensible defaults: pre-select the user's usual office days.
  • Fewer decisions: every option has a cost.
  • Plain language: short sentences, familiar words, numbers in context ("₹220 per meal · 18 meals left").

Hick's law and Fitts's law

Hick–Hyman law: decision time grows with the logarithm of the number of equally likely choices: T = a + b · log₂(n + 1). Ten options take noticeably longer than three; grouping and good defaults help.

Fitts's law: time to hit a target grows with distance and shrinks with size: T = a + b · log₂(D/W + 1). Large, close targets are fast; tiny, distant ones slow. Practical consequences: big primary buttons in thumb reach on mobile; screen edges and corners are effectively large targets on desktop; generous touch targets.

Python
import math
def hick(n, a=0.2, b=0.15): return a + b * math.log2(n + 1)          # seconds; a, b fitted per context
def fitts(distance, width, a=0.1, b=0.12): return a + b * math.log2(distance / width + 1)

[round(hick(n), 2) for n in (2, 5, 10, 20)]                 # 0.44, 0.59, 0.72, 0.86 s: slow but steady growth
round(fitts(600, 24), 2), round(fitts(600, 48), 2), round(fitts(200, 48), 2)   # 0.66, 0.55, 0.38 s

Feedback and response time

Every action needs a response. Classic thresholds (Robert Miller, popularised by Nielsen):

Delay Perception What to do
< 100 ms Instantaneous Direct manipulation feels connected; no indicator needed
~1 s Flow of thought preserved, delay noticed Subtle indicator (button state change, spinner on the control)
~10 s Limit of attention Progress indicator with estimate; allow other work; consider async
> 10 s Users switch tasks Background job with notification on completion (chapter 179)

Techniques:

  • Optimistic UI: show the result immediately (Wednesday marked skipped) while the request completes; reconcile or roll back with a clear message if it fails. Use when success is very likely and rollback is cheap.
  • Skeleton screens for content loading; progress bars for known durations; disable double-submit while pending.
  • State visibility: offline banners, sync status, "last updated" timestamps.
  • Toasts with actions ("Skipped · Undo") for reversible actions; inline messages for errors tied to fields.
  • Haptics and sound sparingly on mobile for confirmation.

Consistency and design systems

Consistency lets users transfer knowledge: the same action looks and behaves the same everywhere, and platform conventions are respected (back navigation on Android, swipe-to-go-back on iOS, standard keyboard shortcuts on the web).

A design system (tokens for colour, type, spacing; components; patterns; content guidelines; accessibility rules; code libraries) makes consistency the default and speeds up building. Engineers own the component library: accessible by default, documented, versioned, tested (visual regression, accessibility checks).

Accessibility

Why

Around 1.3 billion people (≈ 16% of the world's population) live with significant disability (WHO, 2023), and everyone has situational limits (bright sunlight, one hand on a commuter train's handle, a noisy office, a slow phone). Accessibility is also a legal requirement in many markets (the European Accessibility Act applies to many products and services from June 2025; ADA litigation in the US; India's Rights of Persons with Disabilities Act and accessibility standards for public-facing ICT).

WCAG 2.2 and POUR

The Web Content Accessibility Guidelines (WCAG 2.2, W3C Recommendation since October 2023) organise success criteria under four principles, at levels A, AA (the usual legal and contractual target) and AAA:

Principle Meaning Examples
Perceivable Information can be perceived Text alternatives for images; captions; contrast ≥ 4.5:1 for body text (AA); content that reflows at 320 px width; don't use colour alone
Operable UI can be operated Everything works with a keyboard; visible focus; focus not obscured by sticky headers (2.2); targets at least 24×24 CSS px (2.2, AA); no time limits without control; alternatives to dragging gestures (2.2)
Understandable Information and operation are understandable Clear labels and instructions; predictable navigation; error identification and suggestions; consistent help placement (2.2); don't make users re-enter information already given (2.2)
Robust Works with assistive technologies Valid semantics; name, role and value exposed for all controls; status messages announced

Contrast, computed

WCAG's contrast ratio uses relative luminance: (L₁ + 0.05)/(L₂ + 0.05). AA requires 4.5:1 for normal text, 3:1 for large text (≥ 24 px, or ≥ 18.66 px bold) and for UI component boundaries and graphics.

Python
def relative_luminance(hex_color):
    r, g, b = (int(hex_color.lstrip("#")[i:i + 2], 16) / 255 for i in (0, 2, 4))
    lin = lambda c: c / 12.92 if c <= 0.04045 else ((c + 0.055) / 1.055) ** 2.4
    return 0.2126 * lin(r) + 0.7152 * lin(g) + 0.0722 * lin(b)

def contrast(fg, bg):
    l1, l2 = sorted((relative_luminance(fg), relative_luminance(bg)), reverse=True)
    return (l1 + 0.05) / (l2 + 0.05)

for fg in ("#767676", "#949494", "#5b3fa8", "#ffffff"):
    ratio = contrast(fg, "#ffffff" if fg != "#ffffff" else "#5b3fa8")
    print(fg, round(ratio, 2), "AA text" if ratio >= 4.5 else "large text/UI only" if ratio >= 3 else "fails")
# #767676 4.54 AA text · #949494 3.03 large text/UI only · #5b3fa8 (this book's accent) 7.72 · white on accent 7.72

Semantic HTML first, ARIA second

  • Use native elements (<button>, <a href>, <label>, <input>, <select>, <nav>, <main>, headings in order) before ARIA: they come with keyboard behaviour, focus and accessibility semantics for free.
  • The first rule of ARIA: don't use ARIA if a native element does the job. A <div onclick> is not a button; it lacks focusability, Enter/Space activation and the button role.
  • Use ARIA to fill genuine gaps: aria-live regions for status messages, aria-expanded on disclosure buttons, aria-describedby linking hints and errors to inputs, aria-current for the current page, roles for custom widgets following the ARIA Authoring Practices.
  • Keyboard: logical tab order (DOM order), visible focus styles, no keyboard traps, Escape closes dialogs, focus moves into dialogs and returns afterwards, skip links for repeated navigation.
  • Text alternatives: meaningful alt for informative images, alt="" for decorative ones; labels for icon-only buttons.
TSX
// An accessible skip control and status message (React + TypeScript)
import { useId, useState } from "react";

export function SkipDay({ day, cutoffPassed, onSkip }: {
  day: string; cutoffPassed: boolean; onSkip: (day: string) => Promise<void>;
}) {
  const [status, setStatus] = useState<"idle" | "pending" | "done" | "error">("idle");
  const hintId = useId();
  async function handle() {
    setStatus("pending");
    try { await onSkip(day); setStatus("done"); } catch { setStatus("error"); }
  }
  return (
    <div>
      <button type="button" onClick={handle} disabled={cutoffPassed || status === "pending"}
              aria-describedby={hintId} className="btn-primary min-h-11 min-w-11">
        {status === "pending" ? "Skipping…" : `Skip ${day}`}
      </button>
      <p id={hintId} className="hint">
        {cutoffPassed ? "Too late to skip: the kitchen has started cooking." : "Skip before 7:00 am to get a meal credit."}
      </p>
      {/* role="status" is a polite live region: screen readers announce changes without moving focus */}
      <p role="status" aria-live="polite">
        {status === "done" && `${day} skipped. One credit added.`}
        {status === "error" && `Couldn't skip ${day}. Check your connection and try again.`}
      </p>
    </div>
  );
}

Accessible forms

  • Every input has a visible <label> (placeholders are not labels).
  • Group related inputs with <fieldset>/<legend>.
  • Mark required fields in text, not colour alone; use correct input types and autocomplete attributes (tel, email, postal-code, one-time-code) so browsers and password managers help.
  • Validate on submit (and on blur for complex fields), show errors next to fields and in a summary, link errors to inputs with aria-describedby, move focus to the first error, keep the user's input.
  • Don't impose arbitrary formats ("enter phone as +91-XXXXX-XXXXX"); accept variations and normalise.

Native mobile

// Android (Jetpack Compose): semantics for TalkBack, adequate touch targets
Button(
    onClick = { onSkip(day) },
    enabled = !cutoffPassed,
    modifier = Modifier
        .sizeIn(minWidth = 48.dp, minHeight = 48.dp)          // Material's recommended touch target
        .semantics { stateDescription = if (skipped) "Skipped" else "Scheduled" }
) { Text("Skip $day") }

Text(
    text = statusMessage,
    modifier = Modifier.semantics { liveRegion = LiveRegionMode.Polite }   // announced when it changes
)

Testing accessibility

  • Automated checks (axe-core, Lighthouse, eslint-plugin-jsx-a11y, Android Accessibility Scanner, Xcode Accessibility Inspector) catch perhaps a third of issues: missing labels, contrast, invalid ARIA. Run them in CI.
  • Manual: keyboard-only walkthroughs; screen readers (NVDA or JAWS on Windows, VoiceOver on macOS/iOS, TalkBack on Android); zoom to 200–400%; reduced motion; high-contrast modes.
  • People: include disabled users in research and usability tests (chapter 182).

Error prevention

The best error message is the one never needed:

  • Constraints: disable impossible options (days past cut-off) and explain why.
  • Good defaults and forgiving input (accept "9876543210", "+91 98765 43210" and "098765 43210").
  • Confirmation only for destructive, irreversible, rare actions (cancel subscription); frequent confirmations train users to click through.
  • Undo instead of confirm for reversible actions: faster for users, safer in practice.
  • Inline validation and previews ("You'll be charged ₹4,180 on 1 Nov").
  • Idempotent operations in the back end (chapter 168) so retries and double-taps don't double-charge.

Error messages and recovery

A good error message says what happened, why (if useful), and what to do, in plain language, near the problem, without blame:

Bad Good
"Error 409" "Wednesday is already skipped."
"Invalid input" "Enter a 10-digit mobile number, for example 98765 43210."
"Something went wrong" "We couldn't reach TiffinBox. Your change is saved and will sync when you're back online."

Recovery patterns: undo, retry with backoff, saving drafts, offline queues that sync later, preserving form input after errors, clear paths to human help for anything involving money.

Undo, implemented

The command pattern (Volume 13) gives undo naturally: each action knows how to reverse itself; the UI keeps a short history.

TypeScript
interface Command { label: string; apply(): void; undo(): void; }

class Schedule {
  skipped = new Set<string>(); credits = 0;
}

class SkipDay implements Command {
  constructor(private s: Schedule, private day: string) {}
  get label() { return `Skipped ${this.day}`; }
  apply() { if (!this.s.skipped.has(this.day)) { this.s.skipped.add(this.day); this.s.credits++; } }
  undo()  { if (this.s.skipped.delete(this.day)) this.s.credits--; }
}

class History {
  private done: Command[] = [];
  run(c: Command) { c.apply(); this.done.push(c); return c.label; }       // UI shows: label + "Undo"
  undo() { const c = this.done.pop(); c?.undo(); return c ? `Undid: ${c.label}` : "Nothing to undo"; }
}

const s = new Schedule(), h = new History();
console.log(h.run(new SkipDay(s, "Wed")), h.run(new SkipDay(s, "Thu")), s.credits);   // ... 2
console.log(h.undo(), [...s.skipped], s.credits);                                      // Undid: Skipped Thu [ 'Wed' ] 1

Server-side, "undo" is usually a compensating action within a grace period (chapter 171), or a delayed commit (the action takes effect after the undo window, as email clients do for "undo send").

Dark patterns

Deceptive design manipulates users against their interests: hard-to-cancel subscriptions ("roach motels"), pre-ticked add-ons, confirmshaming ("No thanks, I like wasting money"), hidden costs revealed at checkout, fake urgency or scarcity, disguised ads, nagging. They damage trust, and many are now illegal: India's Central Consumer Protection Authority issued guidelines on dark patterns in 2023 listing specific prohibited practices; EU consumer law, the Digital Services Act and US FTC rules also target them. Engineers can and should refuse to build them. For TiffinBox: cancellation must be as easy as subscribing; pre-debit notifications are required for recurring payments anyway.

Localisation

  • Language: externalise strings (ICU MessageFormat for plurals and gender), allow text expansion (German, Tamil and Malayalam strings run long), support Indic scripts with proper fonts and shaping.
  • Formats: dates, times, numbers and currency vary; Indian grouping is lakhs and crores (₹1,00,000).
  • Right-to-left layouts (Arabic, Urdu) mirror direction; use logical CSS properties (margin-inline-start).
  • Input: transliteration keyboards, names that don't fit "first/last", addresses without postcodes, phone formats.
  • Culture: imagery, colours, holidays (TiffinBox's calendar needs Diwali, Sankranti, Bonalu, office-specific holidays).
TypeScript
const amount = 125000.5;
console.log(new Intl.NumberFormat("en-IN", { style: "currency", currency: "INR" }).format(amount));   // ₹1,25,000.50
console.log(new Intl.NumberFormat("en-US", { style: "currency", currency: "INR" }).format(amount));   // ₹125,000.50
console.log(new Intl.DateTimeFormat("te-IN", { dateStyle: "full", timeZone: "Asia/Kolkata" }).format(new Date("2026-10-22T06:30:00Z")));   // 22, అక్టోబర్ 2026, గురువారం
console.log(new Intl.PluralRules("en-IN").select(1), new Intl.PluralRules("en-IN").select(5));      // one other

Performance is UX

Speed shapes perceived quality, conversion and retention. On the web, Core Web Vitals measure user-perceived performance at the 75th percentile of real users:

Metric Measures "Good" threshold
LCP (Largest Contentful Paint) Loading: when the main content appears ≤ 2.5 s
INP (Interaction to Next Paint) Responsiveness to input (replaced FID in March 2024) ≤ 200 ms
CLS (Cumulative Layout Shift) Visual stability ≤ 0.1

For TiffinBox's users on mid-range Android phones and patchy networks: small JavaScript bundles, server rendering of the first view, image optimisation, caching, offline-capable skip actions, and testing on real low-end devices (Volume 4 covers front-end performance in depth).

Lab: auditing a form, automatically and by keyboard

Setup. Chromium via Playwright (pre-installed) and axe-core 4.10.2 on the lab machine. Two versions of TiffinBox's "skip a delivery" page: a careless one (grey text, <div> labels, a <div onclick> button, no alt, a red dot after 2.5 s as the only feedback) and a careful one (semantic <main>, <h1>, <label for>, a real <button> with a specific label, an aria-live status that says "Skipping…" at once and the result after 2.5 s). axe ran with the WCAG 2.0/2.1 A and AA rules plus best practices; then a script pressed Tab through the page and tried to submit with the keyboard.

Experiment 1: what the automated audit found

Version Rules violated Elements
careless 8 17
careful 0 0

The careless version's violations:

Impact Rule Elements
critical image-alt: images must have alternative text 1
critical label: form elements must have labels 1
critical select-name: select element must have an accessible name 1
serious color-contrast 4
serious html-has-lang 1
moderate landmark-one-main, page-has-heading-one, region 1, 1, 7

Contrast ratios behind the color-contrast failures, computed with the WCAG formula:

Pair Ratio AA needs
grey #999 text on white 2.85:1 4.5:1
white on light green #8fd18f (button) 1.80:1 4.5:1
input border #eee on white 1.16:1 3:1 (UI components)
careful: #1f2328 text on white 15.80:1 ✓
careful: white on #1a7f37 button 5.08:1 ✓
careful: input border #6e7781 4.55:1 ✓

Experiment 2: what only a keyboard test found

Careless Careful
Tab order select → input → (page) → select… select → input → button "Skip Tuesday" → …
Enter after the reason field nothing happens submits
first feedback none 1–2 ms: "Skipping…" (announced via aria-live)
final feedback a red ● after 2.5 s 2.54 s: "Tuesday skipped. You won't be charged."
action target size 35 × 22 px 136 × 44 px

The careless page's only action can't be reached or used without a mouse, and axe reported nothing about it: a <div> with a click handler isn't a rule violation by itself. Nor did it flag the colour-only red dot as an error message. Automated tools reliably catch missing names, labels, alt text, contrast and structure; they can't judge whether the page works for keyboard and screen-reader users. A 2-minute keyboard pass (Tab, Shift+Tab, Enter, Space, Escape) found the most severe problem on the page.

Try it yourself

  1. Add axe to your CI with Playwright and fail the build on new critical or serious violations.
  2. Turn on a screen reader (NVDA, VoiceOver or TalkBack) and complete the careless flow; write down every point where you get lost.
  3. Throttle the network to "Slow 3G" and measure time to first feedback on a real page you own.
  4. Rewrite three error messages in your product using the "what happened, why, what to do" pattern.

Revision sheet: UX fundamentals

Key ideas

  • Mental models and Norman's principles: affordances, signifiers, mapping, feedback, constraints, conceptual models.
  • Nielsen's heuristics: visibility of status, match with the real world, user control, consistency, error prevention, recognition over recall, flexibility, minimalist design, error recovery, help.
  • Information architecture: organisation, labelling, navigation, search; card sorting and tree testing.
  • Cognitive load: chunking, progressive disclosure, sensible defaults, fewer choices.
  • Response times: 0.1 s feels instant, 1 s keeps flow, 10 s loses attention; show progress and allow cancel.
  • Consistency through design systems and tokens.
  • Accessibility (WCAG 2.2 AA): perceivable, operable, understandable, robust; semantic HTML first, ARIA only when needed; keyboard, focus, contrast, text alternatives, captions, reflow.
  • Errors: prevent, then explain (what, why, fix), preserve input, allow undo.
  • Ethics: avoid dark patterns; localisation (text expansion, RTL, formats); performance is UX.

Numbers to remember

  • Contrast: 4.5:1 normal text, 3:1 large text and UI components.
  • Response: 0.1 s / 1 s / 10 s.
  • Targets: ≥ 24 × 24 CSS px (WCAG 2.2 minimum), ~44 px recommended.
  • Lab: careless form 8 axe rules / 17 elements; keyboard couldn't submit; axe didn't flag it.

Pitfalls

  • Divs and spans as buttons and links.
  • Placeholder text instead of labels.
  • Colour as the only signal.
  • Silent actions with no feedback or loading state.
  • Treating a clean automated audit as "accessible".

Glossary

  • Affordance / signifier: what an object allows / the cue that shows it.
  • WCAG: Web Content Accessibility Guidelines.
  • ARIA live region: an element whose changes screen readers announce.
  • Progressive disclosure: revealing complexity only when needed.
  • Dark pattern: deceptive design against the user's interest.