0
0
HTMLmarkup~20 mins

Semantic elements and screen readers in HTML - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Semantic Accessibility Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why use semantic elements for screen readers?
Which of the following best explains why semantic HTML elements help screen readers?
AThey prevent users from copying text on the page.
BThey make the page load faster by reducing file size.
CThey automatically add colors and fonts to improve readability.
DThey provide meaningful structure that screen readers use to navigate content easily.
Attempts:
2 left
💡 Hint
Think about how screen readers understand page layout and content.
📝 Syntax
intermediate
2:00remaining
Identify the semantic element for main content
Which HTML element is best to wrap the main content of a page for screen readers?
A<main>
B<section>
C<div>
D<article>
Attempts:
2 left
💡 Hint
This element is specifically designed to hold the main content unique to the page.
rendering
advanced
2:00remaining
Screen reader behavior with landmarks
Given this HTML snippet, what will a screen reader announce when focusing on the <nav> element?
HTML
<nav aria-label="Primary navigation">
  <ul>
    <li><a href="#home">Home</a></li>
    <li><a href="#about">About</a></li>
  </ul>
</nav>
ANo announcement because <nav> is not recognized
BList with 2 items, Home, About
CNavigation region, Primary navigation, list with 2 items
DLink Home, Link About
Attempts:
2 left
💡 Hint
Screen readers announce landmarks and their labels to help users understand page sections.
selector
advanced
2:00remaining
CSS selector for focus style on semantic landmarks
Which CSS selector correctly applies a visible focus outline to all semantic landmark elements when they receive keyboard focus?
Anav:focus, main:focus, aside:focus, footer:focus { outline: 3px solid blue; }
Bnav.focus, main.focus, aside.focus, footer.focus { outline: 3px solid blue; }
Cnav:active, main:active, aside:active, footer:active { outline: 3px solid blue; }
Dnav:hover, main:hover, aside:hover, footer:hover { outline: 3px solid blue; }
Attempts:
2 left
💡 Hint
Focus styles appear when elements receive keyboard focus, not on hover or active states.
accessibility
expert
2:00remaining
Screen reader announcement with incorrect semantic use
What error will a screen reader encounter when a page uses multiple <main> elements?
AIt will ignore all <code>&lt;main&gt;</code> elements except the first one.
BIt will announce each <code>&lt;main&gt;</code> as a separate main region causing confusion.
CIt will crash and stop reading the page.
DIt will treat all <code>&lt;main&gt;</code> elements as <code>&lt;div&gt;</code> with no special meaning.
Attempts:
2 left
💡 Hint
The <main> element should be unique per page for clear navigation.