← Amazon Interview Insights

Amazon·Frontend Engineer·Technical Phone Screen·Senior

Senior
Apr 2026

Summary

Amazon frontend interview that was basically a live coding exercise turned design discussion. Built a flexbox grid and then had to defend scaling and accessibility decisions on the spot. More conversational than I expected but the follow-ups got deep fast.

Questions Asked (2)

Q1

You have a flexbox layout rendering 10 boxes in a responsive grid. How would you scale it to 100 boxes? Compare pagination vs. infinite scrolling, including pros, cons, when each fits, performance implications, and UX impact.

Technical Trade-offsSystem Design
Author's notes

I went straight to infinite scroll because it felt modern and I thought that's what they wanted to hear.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints (e.g., data size, user goals, performance targets). Then compare pagination and infinite scrolling across dimensions like performance, UX, and implementation complexity, and recommend a solution based on the context. Finally, discuss how you would scale the flexbox layout itself (e.g., virtualization, CSS grid) to handle 100 boxes efficiently.

Pro tip: Mention that the choice depends on the use case: pagination is better for goal-oriented tasks (e.g., finding a specific item), while infinite scrolling suits exploratory browsing (e.g., social media). Also, highlight that virtualization is key for performance with large lists, regardless of the loading strategy.

1. Clarify Requirements

Ask questions to understand the data size, user goals, and performance constraints. For example, are users searching for a specific item or browsing? What devices and network conditions are targeted?

2. Compare Pagination vs. Infinite Scrolling

Discuss pros and cons of each approach in terms of performance, UX, and implementation. For instance, pagination offers better control and is SEO-friendly, while infinite scrolling provides seamless browsing but can cause memory issues.

3. Recommend Based on Context

Choose the appropriate strategy based on the clarified requirements. For Amazon, a product listing might benefit from pagination for findability, while a recommendations feed might use infinite scrolling.

4. Address Scaling the Flexbox Layout

Explain how to scale the flexbox layout to 100 boxes efficiently. Mention techniques like CSS Grid for layout, virtualization (e.g., react-window) to render only visible items, and lazy loading images.

5. Summarize Trade-offs and Best Practices

Conclude by summarizing the trade-offs and emphasizing performance optimizations like virtualization, debouncing, and accessibility considerations.

Key Points to Mention

  • Performance implications: pagination reduces initial load and memory usage; infinite scrolling requires virtualization to avoid DOM bloat.
  • UX impact: pagination provides a sense of control and progress; infinite scrolling can lead to loss of context and difficulty returning to a position.
  • When each fits: pagination for goal-oriented tasks (e.g., search results), infinite scrolling for exploratory browsing (e.g., social feeds).
  • Implementation complexity: infinite scrolling requires handling scroll events, loading states, and error recovery; pagination is simpler but may require server-side support.
  • Accessibility: pagination is more accessible for keyboard and screen reader users; infinite scrolling can be problematic without proper focus management.
  • Scaling the layout: use CSS Grid or flexbox with virtualization (e.g., react-window, react-virtualized) to render only visible items and improve performance.

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

Q2

If you go with pagination, how do you make it accessible? Cover keyboard navigation, ARIA roles for the pagination component, focus management on page change, and live region announcements for screen readers.

Technical Trade-offsSystem Design
Author's notes

This is where I actually felt okay.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer around the four areas the interviewer specified: keyboard navigation, ARIA roles, focus management, and live region announcements. For each, explain the specific implementation details and how they work together to create an accessible pagination component. Emphasize that accessibility is not an afterthought but a core requirement, and tie your choices back to real user impact and Amazon's customer obsession.

Pro tip: Mention that you would test with actual screen readers (NVDA, VoiceOver) and keyboard-only navigation, and that you'd use automated tools like axe-core in CI to catch regressions. This shows you understand that accessibility requires both automated and manual verification.

1. Clarify requirements and constraints

Ask about the expected number of pages, whether the pagination is for a table, list, or search results, and if there are any existing design system components. This ensures your solution fits the context and demonstrates thoroughness.

2. Implement keyboard navigation

Ensure all interactive elements (page numbers, previous/next buttons) are focusable and operable via keyboard. Use native <button> or <a> elements, manage tab order logically, and support Enter/Space activation. Consider arrow key navigation within the pagination group for efficiency.

3. Apply appropriate ARIA roles and properties

Use <nav aria-label="Pagination"> to wrap the component. Mark the current page with aria-current="page". Use aria-disabled for disabled buttons instead of the disabled attribute to keep them focusable and announce state. Ensure each page link has an accessible name like "Go to page 2".

4. Manage focus on page change

When a new page loads, move focus to a sensible location: either the first item of the new content, a heading, or the pagination container itself. Avoid losing focus to the body. Use JavaScript to set focus programmatically and ensure it doesn't cause a jarring experience.

5. Announce page changes with live regions

Use an aria-live region (polite) to announce the new page number and total results, e.g., "Page 2 of 10, showing items 11 to 20." Ensure the live region is present in the DOM before the update and that the announcement is concise. Avoid announcing on initial load.

Key Points to Mention

  • Use semantic HTML: <nav> with aria-label, <button> or <a> for page controls, and <ul>/<li> for the list of pages.
  • Keyboard support: Tab to navigate, Enter/Space to activate, and optionally arrow keys to move between page numbers.
  • ARIA attributes: aria-current="page" for the active page, aria-disabled for disabled controls, and aria-label for descriptive names.
  • Focus management: After page change, move focus to the new content or a logical starting point to avoid disorientation.
  • Live region: Use aria-live="polite" to announce page changes and result counts without interrupting the user.
  • Testing: Combine automated tools (axe, Lighthouse) with manual screen reader and keyboard testing to ensure real-world accessibility.

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