Accessibility makes interfaces and documents usable across diverse abilities and assistive technologies. In frontend interviews, demonstrate it through semantic HTML, meaningful document hierarchy, accessible interactions, and appropriate ARIA rather than treating it as a styling afterthought. section 2.1 section 2.5
Show accessibility awareness by explaining:
- Why elements such as <header>, <main>, <nav>, <article>, <section>, headings, and <footer> communicate structure more clearly than generic containers. section 2.1 section 2.5
- How semantic markup supports accessibility, SEO, maintainability, and cross-browser compatibility. section 2.1
- How standard HTML APIs, ARIA attributes, and properly designed forms support accessible interactions and validation. section 2.5
Interview scenario: article component
When implementing a React article page, structure the content with <main>, <article>, <header>, headings, <section>, paragraphs, and <footer>. Explain that these choices describe purpose and hierarchy, not merely visual presentation, then discuss how the same reasoning applies to forms and interactive controls. section 2.1
Listing 2.2 The BlogPost <main> element defined using semantic elements
<main>
<article>
<header>
<h1>{post.title}</h1>
<h2>{post.subtitle}</h2>
</header>
{post.sections.map((section, index) => (
<section key="{index}">
<h3>{section.title}</h3>
{section.subsections.map((subsection, subIndex) => (
<div key="{subIndex}">
<h4>{subsection.title}</h4>
<p>{subsection.content}</p>
</div>
))}
</section>
))}
</article>
</main>
Inspect a semantic BlogPost structure with <main>, <article>, headings, nested sections, and paragraphs. section 2.1








