Skip to the page

Accessibility · Scenario

Making a custom widget accessible (dropdown, modal, tabs, OTP input)

The interviewer asks

You built a custom searchable dropdown in the machine-coding round. Now make it accessible.

Then

Follow-ups the interviewer asks next

  1. The combobox pattern: role="combobox", aria-expanded, aria-controls, aria-activedescendant, listbox/option.
  2. Keyboard: arrows, Home/End, Escape, Enter, type-ahead.
  3. Announcing results count via aria-live.
  4. OTP: autocomplete="one-time-code", paste handling, labels.

The answer

What a strong answer covers

  • Follow the WAI-ARIA Authoring Practices patterns
  • Visible focus and logical focus order
  • Test with a screen reader (VoiceOver/TalkBack/NVDA) and keyboard only

The red pen

Common traps

Avoid:adding ARIA attributes without keyboard behaviour.

Practise this out loud

Say your answer out loud to an AI interviewer that follows up, and get a score for it.

Practise by voice

Practise questions like this out loud

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview