Interview bank track

Accessibility

Inclusive UI practices, keyboard support, semantics, and testing for accessibility.

2 topics13 interview questions with answers
Accessibility3-6y

HTML, CSS, and Accessibility Foundations

Explain semantics, keyboard support, focus, labels, and contrast like a product engineer.

Open study topic
accessibilitysemantic-htmlformskeyboard
Beginner

Beginner interview questions

2 questions

Start with simple definitions, the main idea, and the basic mistakes interviewers expect you to avoid.

screening
Beginner
Explain HTML, CSS, and Accessibility Foundations in very simple words.
Easy answer

Accessible UI means more people can use the app with keyboard, screen reader, zoom, and different visual or motor needs.

Interview-ready answer

Accessible UI means more people can use the app with keyboard, screen reader, zoom, and different visual or motor needs. Easy picture: A good school building has stairs, but it also has a ramp, signs, and enough space for everyone to enter safely.

Example

A good school building has stairs, but it also has a ramp, signs, and enough space for everyone to enter safely.

Why interviewers ask this

Interviewers often begin with a basic question to see whether you truly understand the concept instead of repeating memorized jargon.

accessibilitysemantic-htmlformskeyboard
Common follow-ups
  • Use semantic HTML first.
  • Keyboard and focus states are mandatory.
  • Labels and accessible names matter.
screening
Beginner
What are the first basics to remember about HTML, CSS, and Accessibility Foundations?
Easy answer

Prefer button, link, input, form, nav, main. Every interactive element needs keyboard access. Focus must stay visible. Contrast and hierarchy matter.

Interview-ready answer

Prefer button, link, input, form, nav, main. Every interactive element needs keyboard access. Focus must stay visible. Contrast and hierarchy matter.

Example

A good school building has stairs, but it also has a ramp, signs, and enough space for everyone to enter safely.

Why interviewers ask this

This checks whether you can give a short, calm answer before the interviewer adds depth or follow-ups.

accessibilitysemantic-htmlformskeyboard
Common follow-ups
  • Using divs for buttons and links.
  • Removing focus outlines without a replacement.
1-3 Years

1-3 Years interview questions

2 questions

Cover common screening and theory questions that prove you know the fundamentals and can answer clearly.

theory
1-3 Years
What points should a 1-3 year frontend developer cover for HTML, CSS, and Accessibility Foundations?
Easy answer

Use semantic HTML first. Keyboard and focus states are mandatory. Labels and accessible names matter. ARIA supports semantics, it does not replace them blindly.

Interview-ready answer

Use semantic HTML first. Keyboard and focus states are mandatory. Labels and accessible names matter. ARIA supports semantics, it does not replace them blindly.

Example

A good school building has stairs, but it also has a ramp, signs, and enough space for everyone to enter safely.

Why interviewers ask this

This checks whether you can give a clean interview answer without getting lost in too much detail.

accessibilitysemantic-htmlformskeyboard
Common follow-ups
  • Prefer button, link, input, form, nav, main.
  • Every interactive element needs keyboard access.
  • Focus must stay visible.
theory
1-3 Years
What are the accessibility basics you check in any UI feature?
Easy answer

Semantic HTML, keyboard support, visible focus, labels, contrast, and screen-reader-friendly names.

Interview-ready answer

I first use the right native elements. Then I check tab order, focus visibility, accessible names, form labels, contrast, heading structure, and whether status or error messages are announced properly. Complex widgets may need ARIA, but semantic HTML comes first.

Example

<label htmlFor="email">Email</label> <input id="email" name="email" type="email" autoComplete="email" /> <button type="submit">Save</button>

Why interviewers ask this

This is a common interview question used to test clarity, correctness, and how calmly you explain fundamentals.

a11yhtmlcss
Common follow-ups
  • Why is a div button a problem?
  • How do you test keyboard navigation?
3-6 Years

3-6 Years interview questions

1 questions

Focus on mid-level answers with practical examples, tradeoffs, and implementation thinking.

theory
3-6 Years
How would you answer HTML, CSS, and Accessibility Foundations in a mid-level frontend interview?
Easy answer

Accessible UI means more people can use the app with keyboard, screen reader, zoom, and different visual or motor needs.

Interview-ready answer

Accessibility starts with semantic HTML because native elements already provide roles, keyboard behavior, and focus rules. CSS should preserve visible focus and readable contrast. For forms and widgets I talk about labels, focus order, headings, status messages, and ARIA only when semantics alone are not enough.

Example

<label htmlFor="email">Email</label> <input id="email" name="email" type="email" autoComplete="email" /> <button type="submit">Save</button>

Why interviewers ask this

Mid-level rounds expect more than definitions. They want structured explanation, correct terminology, and practical judgment.

accessibilitysemantic-htmlformskeyboard
Common follow-ups
  • Use semantic HTML first.
  • Keyboard and focus states are mandatory.
  • Labels and accessible names matter.
  • ARIA supports semantics, it does not replace them blindly.
Expert

Expert interview questions

1 questions

Practice high-signal follow-ups around architecture, pitfalls, debugging, scale, and leadership-level judgment.

design
Expert
What tradeoffs, pitfalls, and production issues do you discuss for HTML, CSS, and Accessibility Foundations in an expert-style round?
Easy answer

Accessible UI means more people can use the app with keyboard, screen reader, zoom, and different visual or motor needs. The main thing to avoid is: Using divs for buttons and links.

Interview-ready answer

Accessibility starts with semantic HTML because native elements already provide roles, keyboard behavior, and focus rules. CSS should preserve visible focus and readable contrast. For forms and widgets I talk about labels, focus order, headings, status messages, and ARIA only when semantics alone are not enough. Common pitfalls: Using divs for buttons and links. Removing focus outlines without a replacement. Using ARIA to patch bad semantics instead of fixing markup. Related areas to connect in follow-ups: DOM Events and Event Delegation, Testing Frontend with Confidence.

Example

<label htmlFor="email">Email</label> <input id="email" name="email" type="email" autoComplete="email" /> <button type="submit">Save</button>

Why interviewers ask this

Senior-leaning interviewers test whether you can move from definitions into tradeoffs, debugging, scale, and connected system thinking.

accessibilitysemantic-htmlformskeyboard
Common follow-ups
  • What real bug or production issue can this topic cause?
  • What tradeoff would make you choose one approach over another?
  • How would you explain this decision in a code review or design discussion?
Accessibility3-6y

Accessible Widgets, Dialogs, and ARIA

Go beyond basic semantics and explain modals, tabs, menus, announcements, and ARIA decisions clearly.

Open study topic
accessibilityariadialogfocus-managementwidgets
Beginner

Beginner interview questions

2 questions

Start with simple definitions, the main idea, and the basic mistakes interviewers expect you to avoid.

screening
Beginner
Explain Accessible Widgets, Dialogs, and ARIA in very simple words.
Easy answer

Some UI pieces are more complex than buttons and forms. They still need keyboard support, focus control, and good screen-reader meaning.

Interview-ready answer

Some UI pieces are more complex than buttons and forms. They still need keyboard support, focus control, and good screen-reader meaning. Easy picture: A school auditorium needs more than just a door. It also needs signs, guided seating, and clear rules so everyone can enter, move, and exit safely.

Example

A school auditorium needs more than just a door. It also needs signs, guided seating, and clear rules so everyone can enter, move, and exit safely.

Why interviewers ask this

Interviewers often begin with a basic question to see whether you truly understand the concept instead of repeating memorized jargon.

accessibilityariadialogfocus-managementwidgets
Common follow-ups
  • Custom widgets need correct focus rules.
  • ARIA should support, not replace, semantics.
  • Keyboard behavior must match the pattern.
screening
Beginner
What are the first basics to remember about Accessible Widgets, Dialogs, and ARIA?
Easy answer

Focus in, focus out, focus return. Match ARIA to interaction. Keep state names clear. Test with keyboard first.

Interview-ready answer

Focus in, focus out, focus return. Match ARIA to interaction. Keep state names clear. Test with keyboard first.

Example

A school auditorium needs more than just a door. It also needs signs, guided seating, and clear rules so everyone can enter, move, and exit safely.

Why interviewers ask this

This checks whether you can give a short, calm answer before the interviewer adds depth or follow-ups.

accessibilityariadialogfocus-managementwidgets
Common follow-ups
  • Using ARIA roles without matching keyboard behavior.
  • Opening dialogs without trapping or restoring focus.
1-3 Years

1-3 Years interview questions

2 questions

Cover common screening and theory questions that prove you know the fundamentals and can answer clearly.

theory
1-3 Years
What points should a 1-3 year frontend developer cover for Accessible Widgets, Dialogs, and ARIA?
Easy answer

Custom widgets need correct focus rules. ARIA should support, not replace, semantics. Keyboard behavior must match the pattern. Async updates should be announced clearly.

Interview-ready answer

Custom widgets need correct focus rules. ARIA should support, not replace, semantics. Keyboard behavior must match the pattern. Async updates should be announced clearly.

Example

A school auditorium needs more than just a door. It also needs signs, guided seating, and clear rules so everyone can enter, move, and exit safely.

Why interviewers ask this

This checks whether you can give a clean interview answer without getting lost in too much detail.

accessibilityariadialogfocus-managementwidgets
Common follow-ups
  • Focus in, focus out, focus return.
  • Match ARIA to interaction.
  • Keep state names clear.
theory
1-3 Years
When should you use ARIA and when should you avoid it?
Easy answer

Use ARIA when native HTML is not enough for a complex widget. Avoid it when native elements already provide the correct semantics and behavior.

Interview-ready answer

The best answer is 'native first'. A button already behaves like a button, so adding role='button' to a div is usually a downgrade, not an upgrade. ARIA becomes useful when building patterns like tabs, dialogs, comboboxes, or live regions, but it must match the expected keyboard and announcement behavior. ARIA should describe a real interaction model, not patch over weak markup decisions.

Example

<button aria-expanded={open} aria-controls="help-panel">Help</button> <section id="help-panel" hidden={!open}> <h2>Keyboard tips</h2>

Why interviewers ask this

This is a common interview question used to test clarity, correctness, and how calmly you explain fundamentals.

accessibilityariasemantics
Common follow-ups
  • Why is a div button usually worse than a real button?
  • What does aria-live solve?
3-6 Years

3-6 Years interview questions

2 questions

Focus on mid-level answers with practical examples, tradeoffs, and implementation thinking.

theory
3-6 Years
How would you answer Accessible Widgets, Dialogs, and ARIA in a mid-level frontend interview?
Easy answer

Some UI pieces are more complex than buttons and forms. They still need keyboard support, focus control, and good screen-reader meaning.

Interview-ready answer

For advanced accessibility questions I talk about focus management, keyboard interaction, visible state, and accessible names before I mention ARIA attributes. Native semantics come first. ARIA helps when building custom widgets like dialogs, tabs, or menus, but it should mirror the expected interaction pattern, not patch over broken markup. I also mention announcements for async updates and returning focus after modal close.

Example

<button aria-expanded={open} aria-controls="help-panel">Help</button> <section id="help-panel" hidden={!open}> <h2>Keyboard tips</h2>

Why interviewers ask this

Mid-level rounds expect more than definitions. They want structured explanation, correct terminology, and practical judgment.

accessibilityariadialogfocus-managementwidgets
Common follow-ups
  • Custom widgets need correct focus rules.
  • ARIA should support, not replace, semantics.
  • Keyboard behavior must match the pattern.
  • Async updates should be announced clearly.
coding
3-6 Years
How do you build an accessible modal dialog?
Easy answer

Use the right dialog semantics, move focus into the dialog, keep keyboard users inside it while open, and return focus when it closes.

Interview-ready answer

A good dialog answer includes an accessible name, visible close action, focus movement into the dialog, keyboard escape behavior when appropriate, and focus return to the trigger after close. It should also prevent the background from acting like the main interaction target while the dialog is open. I mention semantic HTML first and then ARIA support when the chosen implementation needs it.

Example

<button aria-expanded={open} aria-controls="help-panel">Help</button> <section id="help-panel" hidden={!open}> <h2>Keyboard tips</h2>

Why interviewers ask this

This checks whether you can apply the concept in code and explain the reasoning, not only define it.

accessibilitydialogfocus
Common follow-ups
  • How do you trap focus?
  • What should happen when the dialog closes?
Expert

Expert interview questions

1 questions

Practice high-signal follow-ups around architecture, pitfalls, debugging, scale, and leadership-level judgment.

design
Expert
What tradeoffs, pitfalls, and production issues do you discuss for Accessible Widgets, Dialogs, and ARIA in an expert-style round?
Easy answer

Some UI pieces are more complex than buttons and forms. They still need keyboard support, focus control, and good screen-reader meaning. The main thing to avoid is: Using ARIA roles without matching keyboard behavior.

Interview-ready answer

For advanced accessibility questions I talk about focus management, keyboard interaction, visible state, and accessible names before I mention ARIA attributes. Native semantics come first. ARIA helps when building custom widgets like dialogs, tabs, or menus, but it should mirror the expected interaction pattern, not patch over broken markup. I also mention announcements for async updates and returning focus after modal close. Common pitfalls: Using ARIA roles without matching keyboard behavior. Opening dialogs without trapping or restoring focus. Hiding important state changes from assistive technology. Related areas to connect in follow-ups: HTML, CSS, and Accessibility Foundations, Testing Frontend with Confidence, DOM Events and Event Delegation.

Example

<button aria-expanded={open} aria-controls="help-panel">Help</button> <section id="help-panel" hidden={!open}> <h2>Keyboard tips</h2>

Why interviewers ask this

Senior-leaning interviewers test whether you can move from definitions into tradeoffs, debugging, scale, and connected system thinking.

accessibilityariadialogfocus-managementwidgets
Common follow-ups
  • What real bug or production issue can this topic cause?
  • What tradeoff would make you choose one approach over another?
  • How would you explain this decision in a code review or design discussion?