Learn accessibility by building a Quiz - Step 20

In this step I am supposed to create a “for” attribute in a label. I am not sure why I keep receiving an error to give my label the appropriate text content.

Here is my code:

<section role="region" aria-labelledby="student-info">
          <h2 id="student-info">Student Info</h2>
          <div class="info">
            <label for="student-name"></label>
            <input type="text" id="student-name" />
          </div>
          <div class="info">
            <label for="email"></label>
            <input type="text" id="email" />
          </div>
          <div class="info">
            <label for="dob"></label>
            <input type="text" id="dob" />
          </div>
        </section>

Hello!
Could you please send us a link to the challenge as well as the tip or error message displayed to you so we can help you better?
Thank you!

I edited the post with the link , and the error I keep receiving keeps saying my first label doesn’t have have the appropriate text content. not exactly sure what that means

Either I have a problem or you provided me with the wrong link, when I click it it points directly to this topic! :laughing:

weird, Im getting the same issue haha. Had to copy paste the link into another tab to get to the correct page:

Works for me now!

I just checked and your mistake is simple and common: you forgot a step of the task: " Give the label elements appropriate for attributes, as well as text content."

Try that :slight_smile:

2 Likes

haha thank you! I must need a break from the pc :joy:

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