Survey challenge error

Hello!

I’m having trouble understanding what the program wants when it says, " For the name, email, and number input fields inside the form I can see corresponding labels that describe the purpose of each field with the following ids: id=“name-label”, id=“email-label”, and id=“number-label”."

I have been unable to figure out what this means, “#name-label is not defined : expected null to not equal null”

It means you do not have the required label elements with the ids that are being asked for.

Improve Form Field Accessibility with the label Element


In any case, you should not be using paragraph elements instead of labels inside forms anyway.

Ok, so… I think you’re trying to help, but I’m a beginner. Could you please try to explain what the error is talking about? I can understand that the labels are not correct.

You need to add some description to the label like so:

<label for="name" id="name-label">SOME DESCRIPTION
    <input id="name" required type="text" placeholder="name"></input>
</label> 

Or so:

<label for="name" id="name-label">SOME DESCRIPTION</label>
<input id="name" required type="text" placeholder="name"></input>
1 Like

Thank you! This was the thing I was missing!

Also, for anyone who finds this thread because they have a similar question, I finally found this website which helped me understand the why of the problem:

http://universalusability.com/access_by_design/forms/label.html

Glad I was able to help.
Have a great day!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.