← Coinbase Interview InsightsFrontend Engineer

Coinbase·Frontend Engineer·Take-home Assignment·Intermediate

Intermediate
May 2026

Summary

Take-home exercise for a frontend role at Coinbase. Build a reorderable list component with accessibility requirements. Pretty scoped but the a11y piece had more surface area than I expected.

Questions Asked (2)

Q1

Build a list UI component in a framework of your choice that lets users reorder items using per-item up and down controls, with proper empty-state handling and stable item identity across re-renders.

Technical Trade-offsSystem Design
Author's notes

The swap logic itself was straightforward, just slice and reassign.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then outline your component architecture with a focus on stable identity and reordering logic. Walk through the implementation step-by-step, explaining trade-offs and how you handle edge cases like empty states and accessibility.

Pro tip: Mention that you'd use a stable unique identifier (like an id from the data) as the key, not the index, to prevent re-render issues. Also, discuss how you'd optimize performance by memoizing item components and using efficient state updates.

1. Clarify Requirements and Constraints

Ask about the framework, expected data size, and any specific UX requirements (e.g., drag-and-drop vs. buttons). Confirm that reordering should be immediate and persistent.

2. Design Component Architecture

Outline the component tree: a parent list component managing state, and child item components receiving props. Emphasize stable keys and controlled reordering.

3. Implement Reordering Logic

Describe how to handle up/down actions: swap items in the array immutably, update state, and disable buttons at boundaries. Discuss using array methods like splice or slice.

4. Handle Empty State and Edge Cases

Explain how to render a placeholder when the list is empty, and handle single-item lists (both buttons disabled). Mention accessibility: aria-labels, keyboard support.

5. Discuss Performance and Trade-offs

Talk about memoization to prevent unnecessary re-renders, and trade-offs between using index vs. id for keys. Mention potential optimizations like virtual scrolling for large lists.

Key Points to Mention

  • Use stable unique identifiers (e.g., item.id) as keys, not array indices, to maintain component state and avoid re-render bugs.
  • Immutable state updates: create a new array when reordering to trigger re-renders correctly.
  • Disable up button for first item and down button for last item to prevent invalid moves.
  • Empty state: render a message like 'No items' and ensure the component doesn't crash.
  • Accessibility: add aria-labels to buttons, ensure keyboard navigability, and announce changes if needed.
  • Performance: memoize item components (React.memo) and consider using useCallback for event handlers to avoid unnecessary re-renders.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Ensure the reorderable list is fully accessible: keyboard operable, with appropriate aria-labels and focus management after each reorder action.

Technical Trade-offsAPI & Integrations
Author's notes

This is where I underdelivered.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements for a fully accessible reorderable list, emphasizing keyboard operability, ARIA labeling, and focus management. Then walk through a concrete implementation using semantic HTML, appropriate ARIA roles, and JavaScript event handling, explaining how each aspect ensures accessibility. Finally, discuss trade-offs and testing strategies to validate the solution.

Pro tip: Mention that you would use a live region to announce reorder actions to screen reader users, and ensure focus remains on the moved item so users can continue reordering without losing context.

1. Clarify requirements and constraints

Confirm the expected keyboard interactions (e.g., arrow keys to move, space/enter to pick up/drop) and the need for ARIA labels that describe each item's position and reorder controls. Discuss any framework or library constraints.

2. Choose accessible markup and roles

Use a list structure (ul/li) with role='list' and each item having role='listitem'. Add a drag handle button with aria-label like 'Reorder item X' and ensure it's focusable. Consider using aria-grabbed or a custom state to indicate reorder mode.

3. Implement keyboard operability

Enable keyboard users to reorder via arrow keys when an item is focused. Provide clear instructions via aria-describedby. Ensure that pressing space/enter toggles reorder mode, and escape cancels.

4. Manage focus and announcements

After a reorder action, keep focus on the moved item so the user can continue. Use an aria-live region (polite) to announce the new position, e.g., 'Item moved to position 3 of 5'.

5. Test and iterate

Test with screen readers (NVDA, VoiceOver) and keyboard-only navigation. Validate ARIA attributes and ensure no focus traps. Iterate based on feedback and consider automated accessibility testing tools.

Key Points to Mention

  • Use semantic HTML and ARIA roles (list, listitem) to provide structure.
  • Ensure all interactive elements are keyboard focusable and operable via standard keys.
  • Provide clear aria-labels for reorder controls and item positions.
  • Manage focus after reorder to maintain context and allow continuous reordering.
  • Use aria-live regions to announce reorder actions to screen reader users.
  • Test with assistive technologies and keyboard-only navigation to validate accessibility.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.