← Back to Stage 5
Stage 5#512Debugging · Mid~10 min read

Review a transaction timeline for accessibility

Design System, UX, Security · Safe Interaction Design

Find missing labels, bad focus order, color-only state, live-region noise, and ambiguous status copy.

Prompt

Review a transaction timeline for accessibility

This is a hands-on rep. Attempt the drill before reading the model answer, then narrate the tradeoffs as if an interviewer is watching.

💡
Tip

Senior frontend interviews often hide accessibility issues inside otherwise polished UI.

Foundation

What to ground before answering

Find missing labels, bad focus order, color-only state, live-region noise, and ambiguous status copy.

Focus vocabulary: accessibility, status, review.

The useful mental model is not to memorize a perfect answer. It is to explain what owns the data, what can fail, what the user sees, and what test would prove the behavior.

Coding drill

Audit transaction timeline accessibility

Target: 15mNot run

Make the behavior executable before comparing against the model answer.

type TimelineStep = {
  label: string;
  current?: boolean;
  ariaLabel?: string;
  colorOnly?: boolean;
};

function auditTimeline(steps: TimelineStep[]): string[] {
  // TODO: return issue codes: missing-current-label, missing-aria-label, color-only.
  return [];
}
TypeScript · runnable
System design

Interview explanation prompt

  • What problem is this practice item really testing?
  • What state or contract boundary must be explicit?
  • What edge case would cause a production regression?
  • What would you test first?
  • How would you explain the tradeoff in two minutes?
Self-grade

Self-grade

  • Strong answer handles the edge cases before polishing syntax.
  • Strong answer explains why the chosen type or function boundary prevents bugs.
  • Weak answer passes only the happy path or hides uncertainty in booleans and nullable fields.

Model Answer

function auditTimeline(steps: TimelineStep[]): string[] {
  const issues = new Set<string>();
  if (steps.some((step) => step.current && !step.ariaLabel?.includes('current'))) {
    issues.add('missing-current-label');
  }
  if (steps.some((step) => !step.ariaLabel)) issues.add('missing-aria-label');
  if (steps.some((step) => step.colorOnly)) issues.add('color-only');
  return [...issues];
}
Review

Recall before moving on

  • What is the one-sentence answer for "Review a transaction timeline for accessibility"?
  • Which real experience from PR TIMES, React/TypeScript migration, or systems work supports it?
  • What edge case would you volunteer before the interviewer asks?
  • What is the smallest test or artifact that proves the design works?