GuidesAccessibility
Accessibility for frontend exams and interviews
What timed frontend tests ask about a11y: semantics, labels, alt text, focus, keyboard access, and common traps.
Why accessibility shows up in MCQs
Accessibility questions check whether you build interfaces that work for assistive technology and keyboard users — not only visual polish. Exams reward precise vocabulary: landmark roles, label association, and the difference between decorative and informative images.
Treat a11y like HTML semantics: the “correct” answer is usually the one that communicates meaning to the browser and AT, even if a div-with-styles hack looks the same on screen.
High-yield topics
Semantic structure: one clear page landmark set (main, nav, header, footer), heading order without random skips, and buttons for actions vs links for navigation. Forms: every input needs a label (wrap or for/id); required and type attributes help native validation.
Images: informative images need descriptive alt; decorative images use empty alt. Focus: never remove outlines without an equivalent :focus-visible style. Keyboard users must reach controls and see where they are.
ARIA is a last resort when native HTML cannot express the pattern. Prefer a real button over role="button" on a div. Know aria-label vs visible text, and that ARIA does not fix broken markup by itself.
How to practice
On frontendprep, watch for HTML and Frontend questions about labels, alt, landmarks, and focus. After misses, write one rule in your own words. Pair quizzes with the HTML tips on the Preparation page, then verify edge cases on MDN when standards change.