Accessibility
Inclusive UI practices, keyboard support, semantics, and testing for accessibility.
HTML, CSS, and Accessibility Foundations
Explain semantics, keyboard support, focus, labels, and contrast like a product engineer.
Beginner interview questions
Start with simple definitions, the main idea, and the basic mistakes interviewers expect you to avoid.
Accessible UI means more people can use the app with keyboard, screen reader, zoom, and different visual or motor needs.
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.
A good school building has stairs, but it also has a ramp, signs, and enough space for everyone to enter safely.
Interviewers often begin with a basic question to see whether you truly understand the concept instead of repeating memorized jargon.
- Use semantic HTML first.
- Keyboard and focus states are mandatory.
- Labels and accessible names matter.
Prefer button, link, input, form, nav, main. Every interactive element needs keyboard access. Focus must stay visible. Contrast and hierarchy matter.
Prefer button, link, input, form, nav, main. Every interactive element needs keyboard access. Focus must stay visible. Contrast and hierarchy matter.
A good school building has stairs, but it also has a ramp, signs, and enough space for everyone to enter safely.
This checks whether you can give a short, calm answer before the interviewer adds depth or follow-ups.
- Using divs for buttons and links.
- Removing focus outlines without a replacement.
1-3 Years interview questions
Cover common screening and theory questions that prove you know the fundamentals and can answer clearly.
Use semantic HTML first. Keyboard and focus states are mandatory. Labels and accessible names matter. ARIA supports semantics, it does not replace them blindly.
Use semantic HTML first. Keyboard and focus states are mandatory. Labels and accessible names matter. ARIA supports semantics, it does not replace them blindly.
A good school building has stairs, but it also has a ramp, signs, and enough space for everyone to enter safely.
This checks whether you can give a clean interview answer without getting lost in too much detail.
- Prefer button, link, input, form, nav, main.
- Every interactive element needs keyboard access.
- Focus must stay visible.
Semantic HTML, keyboard support, visible focus, labels, contrast, and screen-reader-friendly names.
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.
<label htmlFor="email">Email</label> <input id="email" name="email" type="email" autoComplete="email" /> <button type="submit">Save</button>
This is a common interview question used to test clarity, correctness, and how calmly you explain fundamentals.
- Why is a div button a problem?
- How do you test keyboard navigation?
3-6 Years interview questions
Focus on mid-level answers with practical examples, tradeoffs, and implementation thinking.
Accessible UI means more people can use the app with keyboard, screen reader, zoom, and different visual or motor needs.
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.
<label htmlFor="email">Email</label> <input id="email" name="email" type="email" autoComplete="email" /> <button type="submit">Save</button>
Mid-level rounds expect more than definitions. They want structured explanation, correct terminology, and practical judgment.
- 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 interview questions
Practice high-signal follow-ups around architecture, pitfalls, debugging, scale, and leadership-level judgment.
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.
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.
<label htmlFor="email">Email</label> <input id="email" name="email" type="email" autoComplete="email" /> <button type="submit">Save</button>
Senior-leaning interviewers test whether you can move from definitions into tradeoffs, debugging, scale, and connected system thinking.
- 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?
Accessible Widgets, Dialogs, and ARIA
Go beyond basic semantics and explain modals, tabs, menus, announcements, and ARIA decisions clearly.
Beginner interview questions
Start with simple definitions, the main idea, and the basic mistakes interviewers expect you to avoid.
Some UI pieces are more complex than buttons and forms. They still need keyboard support, focus control, and good screen-reader meaning.
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.
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.
Interviewers often begin with a basic question to see whether you truly understand the concept instead of repeating memorized jargon.
- Custom widgets need correct focus rules.
- ARIA should support, not replace, semantics.
- Keyboard behavior must match the pattern.
Focus in, focus out, focus return. Match ARIA to interaction. Keep state names clear. Test with keyboard first.
Focus in, focus out, focus return. Match ARIA to interaction. Keep state names clear. Test with keyboard first.
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.
This checks whether you can give a short, calm answer before the interviewer adds depth or follow-ups.
- Using ARIA roles without matching keyboard behavior.
- Opening dialogs without trapping or restoring focus.
1-3 Years interview questions
Cover common screening and theory questions that prove you know the fundamentals and can answer clearly.
Custom widgets need correct focus rules. ARIA should support, not replace, semantics. Keyboard behavior must match the pattern. Async updates should be announced clearly.
Custom widgets need correct focus rules. ARIA should support, not replace, semantics. Keyboard behavior must match the pattern. Async updates should be announced clearly.
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.
This checks whether you can give a clean interview answer without getting lost in too much detail.
- Focus in, focus out, focus return.
- Match ARIA to interaction.
- Keep state names clear.
Use ARIA when native HTML is not enough for a complex widget. Avoid it when native elements already provide the correct semantics and behavior.
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.
<button aria-expanded={open} aria-controls="help-panel">Help</button> <section id="help-panel" hidden={!open}> <h2>Keyboard tips</h2>
This is a common interview question used to test clarity, correctness, and how calmly you explain fundamentals.
- Why is a div button usually worse than a real button?
- What does aria-live solve?
3-6 Years interview questions
Focus on mid-level answers with practical examples, tradeoffs, and implementation thinking.
Some UI pieces are more complex than buttons and forms. They still need keyboard support, focus control, and good screen-reader meaning.
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.
<button aria-expanded={open} aria-controls="help-panel">Help</button> <section id="help-panel" hidden={!open}> <h2>Keyboard tips</h2>
Mid-level rounds expect more than definitions. They want structured explanation, correct terminology, and practical judgment.
- Custom widgets need correct focus rules.
- ARIA should support, not replace, semantics.
- Keyboard behavior must match the pattern.
- Async updates should be announced clearly.
Use the right dialog semantics, move focus into the dialog, keep keyboard users inside it while open, and return focus when it closes.
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.
<button aria-expanded={open} aria-controls="help-panel">Help</button> <section id="help-panel" hidden={!open}> <h2>Keyboard tips</h2>
This checks whether you can apply the concept in code and explain the reasoning, not only define it.
- How do you trap focus?
- What should happen when the dialog closes?
Expert interview questions
Practice high-signal follow-ups around architecture, pitfalls, debugging, scale, and leadership-level judgment.
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.
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.
<button aria-expanded={open} aria-controls="help-panel">Help</button> <section id="help-panel" hidden={!open}> <h2>Keyboard tips</h2>
Senior-leaning interviewers test whether you can move from definitions into tradeoffs, debugging, scale, and connected system thinking.
- 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?