Explore Library
Code Quiz

Label association and native validation

Spot why native validation works but the label fails to connect to its input for accessibility.

Codehtml
<form>
  <label for="email">Email address</label>
  <input
    type="email"
    name="email"
    id="user-email"
    required
  />
  <button type="submit">Subscribe</button>
</form>

Native email validation still works, but screen readers and label clicks don't focus the field. What is the bug?