Problem Statement
How should labels and help text be connected for accessibility?
Explanation
Connect each label to its input using the for attribute with a matching id. This ensures screen readers read the label when the input gains focus.
Add help text below inputs using a small element with an id, and link it using aria-describedby. This keeps the instructions clear for all users.
Code Solution
SolutionRead Only
<label for='pwd' class='form-label'>Password</label> <input id='pwd' class='form-control' aria-describedby='pwdHelp'> <div id='pwdHelp' class='form-text'>Use eight or more characters.</div>
