Skip to content
Preptima

Accessibility interview questions

Semantics, keyboard interaction, ARIA use and misuse, and WCAG criteria raised in review.

5 questions in Frontend Engineering.

medium2

mediumConceptCodingScenario

This form marks invalid fields with red text and a red border. What has to change?

Accessible form errors need visible text, programmatic association with the field using aria-describedby, aria-invalid for state and deliberate focus handling after submit. Use this accessibility answer to show the decision, trade-off, and evidence rather than a memorised definition. It also connects FORMS to the point an interviewer is testing.

4 minentry, mid, senior

hard3

hardScenarioConceptCoding

A modal passed design and QA review, but keyboard users report they can tab out of it into the page behind, and once they do they cannot get back or close it. Diagnose it and tell me what a correct dialog does.

The dialog was built as a styled div, so nothing marks the rest of the page inert. Focus was never moved in, never constrained, never restored on close, and Escape was never wired. A correct dialog moves focus in, keeps it in, restores it, marks background inert and is labelled - which native dialog with showModal gives you almost for free.

4 minmid, senior, staff