Skip to content

Accessibility Basics for Frontend Interviews

Keyboard navigation, focus management, ARIA basics, and common accessibility mistakes.

Rajesh DhimanFebruary 08, 20262 min read
On this page

30‑second interview answer

Web accessibility means building interfaces usable by everyone, including keyboard-only and screen-reader users. The basics: semantic HTML, keyboard navigation, visible focus states, correct labels, and minimal ARIA (only where necessary). If it works with keyboard and screen reader, it’s usually accessible.


The 5 essentials interviewers expect

  1. Keyboard
  • Everything interactive must be reachable via Tab
  • Enter/Space activates controls
  1. Focus states
  • Focus must be visible (don’t remove outlines without a replacement)
  1. Semantics
  • Use button, a, label, headings, landmarks
  1. Labels & names
  • Inputs need labels
  • Buttons need accessible names
  1. Contrast
  • Text should have sufficient contrast

Common a11y mistakes

  • Click handlers on <div>s
  • Missing <label for>
  • Placeholder used as label
  • No focus ring
  • Bad ARIA (“aria-label” everywhere without semantics)

ARIA quick primer (safe interview stance)

  • Use ARIA when you build custom components.
  • Keep ARIA states accurate:
    • aria-expanded
    • aria-controls
    • aria-selected

Don’t use ARIA to pretend a div is a button unless you implement full keyboard behavior.


Practical checklist: dropdown menu

If you build a dropdown:

  • focus goes to trigger button
  • opening moves focus into menu (or keeps on trigger, but keyboard works)
  • Escape closes
  • Up/Down navigates items

Mini Q&A

Q1: Fastest a11y improvement?

  • Semantic HTML + focus styles.

Q2: Why is placeholder not a label?

  • It disappears, not read consistently, harms usability.

Q3: What’s your ARIA philosophy?

  • Native first; ARIA for gaps.

Summary checklist

  • Everything works with keyboard.
  • Focus is visible.
  • Labels exist.
  • Contrast is OK.
  • ARIA used only when needed.
Companion Book

Looking for structured, offline interview prep?

Free online lessons • Portable Amazon Kindle / Paperback

Frontend Interview Guide (2025 Edition) cover
Recommended for React & Frontend Rounds

Frontend Interview Guide (2025 Edition)

By Rajesh Dhiman

Comprehensive preparation covering React internals, Web Performance, CSS architecture, and system design questions.

View on Amazon ↗Kindle & Paperback
JavaScript Interview Guide cover
Recommended for Core JS Rounds

JavaScript Interview Guide

By Rajesh Dhiman

Deep dive into the Event Loop, microtask draining, closures, prototypal inheritance, and asynchronous execution patterns.

View on Amazon ↗Kindle & Paperback

Note: All lessons on Frontend Interview remain completely free to read online. As an Amazon Associate, we may earn from qualifying purchases.

RD

Written by Rajesh Dhiman

Authored by Rajesh Dhiman and engineered at Eunix Tech. Focused on deep-dive frontend engineering, JavaScript runtime internals, React architecture, and web performance.