Foundations · core
Semantic HTML first: elements, landmarks and headings
Native HTML elements already carry the right role, keyboard behaviour and states (a <button> is focusable and works with Enter and Space), so use them first, structure pages with landmarks and a logical heading outline, and reach for ARIA only when HTML has no element for the job.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- <button> for actions, <a href> for navigation. A div with onClick has no role, is not focusable and ignores the keyboard.
- Landmarks: <header>, <nav>, <main> (one per page), <aside>, <footer>, <form> with a name, <section> with a heading. Screen-reader users jump between them.
- Headings: one h1 for the page topic, then h2, h3 without skipping levels for structure (not for font size). Many screen-reader users navigate by headings first.
- Lists (<ul>/<ol>), tables (<table> with <th scope> and <caption>) and <label> give structure that assistive tech announces ('list, 5 items').
- Images: meaningful images get alt text that says the purpose; decorative ones get alt="" so they are skipped; an icon-only button needs an accessible name.
- Native interactive elements: <dialog>, <details>/<summary>, <select>, the Popover API (Baseline 2024) and the inert attribute (Baseline 2023) remove a lot of custom ARIA.
- Set <html lang> (and lang on parts in other languages, e.g. Hindi) so screen readers use the right voice.
The red pen
Common traps: mistake → fix
Mistake: "role='button' on a div makes it a button"
Fix: it only changes the announced role; you must add tabindex and Enter/Space handling yourself.
Mistake: "Pick heading levels by size"
Fix: levels are structure; style with CSS.
Mistake: "Every image needs descriptive alt text"
Fix: decorative images should have alt="".
Easy to hard
Questions interviewers ask, easy to hard
- Why use semantic HTML? What does <button> give you that a div doesn't?
- Fix this markup: a clickable div, a div-soup header, an image without alt.
- What are landmarks and how do screen-reader users use them?
- When is alt="" correct?
Practise
Practise with these questions
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.