Recommended preparation

Frontend UI Interview Questions: Build Accessible Components Under Time

A practice-first map for shipping complete, accessible UI components under interview time pressure.
22 minuihtmlcssjavascriptaccessibilitypractice-map

Use this frontend UI interview questions practice map to prioritize common component prompts, model strong answers, score your solution with a rubric, and drill accessibility, keyboard support, and React/HTML/CSS execution under time pressure.

Menu
On this page
Last updated: June 2026 | Author: FrontendAtlas Team | Reviewed by FrontendAtlas

In frontend UI interviews, the fastest way to score well is to ship a small component that works, then harden it with keyboard support, accessible semantics, responsive styling, and edge-case tests.

Short answer for this page

  • Most common UI prompts: modal, autocomplete, tabs, form validation, accordion, and data table.
  • Winning approach: ship the MVP first, then harden keyboard behavior, accessibility, responsive layout, and edge cases.
  • Senior signal: explain trade-offs and test failure states out loud while you code.

Use this page as a frontend UI interview practice map for a frontend UI coding interview. It keeps broad machine coding strategy out of scope and focuses on component interview questions, accessibility checks, and direct drills. If your round is a React UI coding interview, the same state, keyboard, and a11y signals still decide the score.

500+practice questions
UIcomponent drills
Liveeditor + checks
Accessibility-firstpatterns

Most asked frontend UI interview questions and component prompts

These prompts show up because they reveal the same signals: state ownership, keyboard behavior, ARIA semantics, responsive layout, and whether you can test a component before time runs out.

HTMLA11y

Requirement: build an accessible modal that opens, confirms, cancels, closes, and restores focus.

Test focus: accessible name, Escape, outside click policy, focus trap modal behavior.

ReactAsync UI

Autocomplete

Requirement: build autocomplete with filtering, debounce, and mouse or keyboard selection.

Test focus: debounce, loading, empty results, stale response policy.

ReactForms

Contact Form

Requirement: solve an accessible form validation interview prompt with fields, submit, and feedback.

Test focus: labels, required fields, disabled submit, error recovery.

ReactNavigation

Tabs

Requirement: build tabs that switch panels and preserve active state.

Test focus: roving tabindex, ARIA tabs linkage, Home/End keys.

CSSResponsive layout

Responsive Flexbox Navbar

Requirement: practice a Flexbox navbar coding challenge with brand, links, CTA, and mobile behavior.

Test focus: readable links, visible focus, flex-wrap, gap, and no hidden navigation.

CSSGrid layout

Requirement: build a responsive CSS Grid card gallery with exact 2-to-4 column behavior.

Test focus: repeat(), minmax(), gap, long titles, extra cards, and no horizontal overflow.

ReactDisclosure

Accordion

Requirement: build an accordion with predictable expand and collapse state.

Test focus: single vs multi-open policy, button semantics, keyboard toggles.

ReactTables

Data Table / Pagination

Requirement: build table rows, page controls, and derived visible data.

Test focus: page bounds, derived rows, disabled controls, table semantics.

ReactData shaping

Dynamic Table

Requirement: render changing columns and rows from structured data.

Test focus: stable keys, missing values, header mapping, sort follow-up.

ReactTree state

Nested Checkbox Tree

Requirement: sync parent and child checkbox states in a tree.

Test focus: indeterminate state, DFS updates, partial selection, reset.

ReactNested UI

Nested Comments

Requirement: render reply trees with one active input at a time.

Test focus: recursion depth, active state, empty replies, stable IDs.

ReactInput widget

Star Rating

Requirement: build rating preview, select, reset, and announcements.

Test focus: hover vs committed state, keyboard input, accessible labels.

ReactComposite input

Chips Autocomplete

Requirement: add, remove, and suggest tags without duplicate chips.

Test focus: keyboard removal, duplicate prevention, suggestions, empty input.

ReactStatus UI

Progress Bar

Requirement: show bounded progress and threshold states clearly.

Test focus: 0/100 bounds, ARIA progressbar, colors, reduced motion.

Interview answers for common UI prompts

A strong answer names the behavior contract before code, ships the baseline, and then hardens accessibility and edge cases.

What to say
I will confirm close policy, use a semantic dialog, restore focus, and test Escape and Tab before visual polish.
MVP
Open, confirm, cancel, close, and show a visible title.
Hardening
Focus restore, accessible name, outside-click policy, and focus trap behavior.

Autocomplete

What to say
I will separate input text, highlighted option, selected value, and request state so stale results cannot win.
MVP
Filter suggestions and select an option with mouse or Enter.
Hardening
Debounce, loading and empty states, Arrow keys, and stale response guards.

Tabs

What to say
Tabs are navigation state: connect tab buttons to panels and keep keyboard movement predictable.
MVP
Track active tab state and render the matching panel.
Hardening
Roving tabindex, aria-controls, Home/End keys, and visible focus.

Form Validation

What to say
I will choose validation timing, keep errors tied to fields, and make recovery obvious.
MVP
Fields, submit, required validation, and feedback after invalid input.
Hardening
Labels, aria-describedby, disabled-submit policy, recovery, and server errors.

Data Table

What to say
I will derive visible rows from source data, page state, and filters instead of mutating the original list.
MVP
Rows, headers, pagination controls, and current page state.
Hardening
Bounds, empty state, disabled controls, table semantics, and stable keys.

Worked example: Confirm Dialog

The Confirm Dialog is a useful rehearsal prompt because it touches every scoring surface: markup, state, focus, keyboard behavior, and visual polish. Practice the direct drill here: Modal: Native dialog confirm.

Clarify checklist

  • Confirm the trigger, confirm action, cancel action, and close behavior.
  • Ask whether outside click should close or be ignored.
  • Name the accessible title and description before coding.

DOM/state model

  • Track isOpen, lastFocus, and the active confirm/cancel callbacks.
  • Keep the trigger button outside the dialog and restore focus after close.
  • Use a small state surface before extracting helpers.

Focus and keyboard policy

  • Focus restore: save the trigger before opening.
  • Focus trap policy: cycle Tab and Shift+Tab inside the panel if asked.
  • Escape policy: close only when the dialog is open.

A11y checks

  • Use role="dialog" or native <dialog> with an accessible name.
  • Connect title and description with aria-labelledby and aria-describedby.
  • Keep visible focus and respect reduced motion.
let isOpen = false;
let lastFocus = null;

function openDialog() {
  lastFocus = document.activeElement;
  isOpen = true;
  dialog.hidden = false;
  confirmButton.focus();
}

function closeDialog() {
  isOpen = false;
  dialog.hidden = true;
  lastFocus?.focus();
}

document.addEventListener('keydown', (event) => {
  if (isOpen && event.key === 'Escape') closeDialog();
});

Junior vs senior UI interview expectations

PromptJunior answerSenior answer
ModalToggle open state and close on button click.Define close policy, accessible naming, focus restore, Escape behavior, and test keyboard paths.
AutocompleteFilter options as the user types.Separate input, highlight, selected value, async state, stale response handling, and keyboard selection.
Data TableRender rows and pagination buttons.Derive rows from source data, guard page bounds, handle empty states, and preserve stable keys.
FormShow required-field errors.Choose validation timing, tie errors to fields, support recovery, and account for server-side failures.
TabsSwitch visible content when a tab is clicked.Use button semantics, connect tabs to panels, support roving tabindex, Home/End keys, and visible focus.

45/60-minute UI round flow

TimeMoveSignal
0-5 minClarify prompt, data shape, interactions, keyboard expectations, and edge cases.You avoid hidden assumptions.
5-15 minShip MVP markup and the smallest visible state path.You can make progress quickly.
15-30 minAdd state/interactions: open, close, select, reset, submit, or derived rows.Your component behaves correctly.
30-45 minHarden keyboard/a11y, responsive styling, loading, empty, and error states.You know frontend correctness is more than click demos.
45-60 minDry run edge cases, explain trade-offs, and state what you would improve next.You can verify and communicate under pressure.

What interviewers score

30MVP behavior: the core interaction works before polish.
20State correctness: no stale active item, invalid page, or duplicate chip.
20Accessibility and keyboard: labels, roles, focus, and key paths are covered.
10Edge cases: empty, loading, error, reset, and bounds are handled.
10Responsive polish: spacing, overflow, and visible focus hold on small screens.
10Communication and testing: trade-offs and failure states are explained out loud.
  • Component boundaries: clear props, local state, derived data, and callbacks.
  • State correctness: no stale active item, invalid page, duplicate chip, or stuck loading state.
  • Keyboard support: Escape, Enter, Arrow keys, Tab order, and focus restore where relevant.
  • ARIA and semantics: real buttons, labels, roles, names, descriptions, and table/list structure.
  • Visual polish: readable spacing, visible focus, responsive layout, and clear disabled/error states.
  • Debugging: logs state changes, checks selectors, tests odd paths, and explains fixes out loud.
  • Communication: names trade-offs and keeps the interviewer aware of scope decisions.

Core UI concepts interviewers expect

Semantic HTML

Use real buttons, labels, forms, headings, lists, tables, and landmarks before custom roles.

Forms

Know label association, validation timing, disabled-submit policy, and server-error recovery.

Focus management

Track the active element, restore focus after overlays, and keep visible focus states intact.

Events

Understand click and keyboard handlers, propagation, delegation, and when default behavior matters.

Layout

Use Flexbox, Grid, intrinsic sizing, overflow handling, and responsive constraints deliberately.

Async UI state

Model loading, empty, error, retry, stale responses, and disabled states as explicit UI states.

What to skip vs prioritize

PriorityDo thisAvoid spending time on
PrioritizeCorrect state, keyboard, a11y, empty/error/loading states, and a dry run.Pixel-perfect mock matching before behavior works.
Know lightlyAnimations, transitions, theme polish, and microcopy if core behavior is done.Complex animation systems or custom design systems.
Skip unless askedHeavy abstractions, virtualized rendering, portals, and generic component libraries.Reusable architecture that slows down the prompt.

Choose your next practice format

FAQ

What are the most common frontend UI interview questions?

Common frontend UI interview questions include modal dialogs, autocomplete, tabs, accordion, data tables, nested checkboxes, forms, star rating, and nested comments.

How do I practice frontend UI coding interview questions?

Practice one component at a time under 45 to 60 minutes. Ship the MVP first, then add keyboard support, ARIA semantics, responsive styling, edge cases, and a short trade-off explanation.

Which React UI component questions should I practice?

Start with autocomplete, tabs, accordion, data table pagination, nested checkbox tree, nested comments, star rating, chips autocomplete, and progress bar drills.

How do interviewers score accessibility and keyboard support?

Accessibility is core correctness. Interviewers expect labels, semantic controls, focus management, keyboard paths, visible focus, and clear disabled or error states.

What should a senior answer include in a UI interview?

A senior answer should state the behavior contract, ship an MVP, explain state ownership, harden keyboard and accessibility, cover failure states, and describe tests or trade-offs out loud.

Is this different from frontend machine coding interviews?

It overlaps with frontend machine coding interviews, but this page narrows the scope to UI component execution. Broader machine coding rounds can also include data fetching, routing, app state, and larger product workflows.