HTML & CSS Labels & ARIA Quiz

This HTML quiz covers labels and ARIA attributes. You will connect labels to inputs, name icon buttons, describe fields and announce updates, and spot ARIA that makes a page harder to use instead of easier.

Medium 10 questions ~6 minutes Pass at 80%

Choose a mode

Playing as a guest: sign in to keep your XP and streak.

Sample question

Question 1 of 10

What does the for attribute connect here?

<label for="email">Email</label>
<input id="email" type="email" name="email">
Show the answer

A. Its value matches the input's id, so clicking the label focuses the input and screen readers use the label as its name for points to the id of the control, not its name. The label then becomes the control's accessible name and a bigger click target, which helps a lot with small checkboxes.

What this quiz covers

  • <label for> and wrapping labels
  • The first rule of ARIA
  • aria-label, aria-describedby and aria-live
  • aria-hidden and tabindex pitfalls
  • Keeping the accessible name in line with the visible text

Questions people ask

Do I need an account?

No. Anyone can play. Sign in to keep your XP, streak, badges and history.

Can I retake it?

Yes. Your best score is kept, and the questions and answers are shuffled each time.