Learn Accessibility by Building a Quiz - Step 33

Hello everyone!

I’m stuck, i keep getting the following error message: " You should give the third input a name attribute."
But I have a name for each input, they’re grouped by two under the same name to not be selectable at the same time. I don’t understand.

Here’s my code:

<ul class="answers-list">
                <fieldset><li>
                  <label for="q1-a1">
                    <input type="radio" id="q1-a1" value="true" name="question1" />
                    True
                  </label>
                </li>
                <li>
                  <label for="q1-a2">
                    <input type="radio" id="q1-a2" value="false" name="question1"/>
                    False
                  </label>
                </li>
                </fieldset>
              </ul>
            </fieldset>
          </div>
          <div class="question-block">
            <p>2</p>
            <fieldset class="question" name="html-question-two">
              <legend>
                A label element nesting an input element is required to have a
                for attribute with the same value as the input's id
              </legend>
              <ul class="answers-list">
                <li>
                  <label for="q2-a1">
                    <input type="radio" id="q2-a1" value="true" name="question2"/>
                    True
                  </label>
                </li>
                <li>
                  <label for="q2-a2">
                    <input type="radio" id="q2-a2" value="false" name="question2"/>
                    False
                  </label>
                </li>
              </ul>

Thank you!

1 Like

I have tried using various name formats: with / without space, letters only, numbers only, various lengths. Nothing seems to work

1 Like

Problem solved. It came from the fieldset element above. Thanks!

2 Likes

Giving out solution code isn’t allowed on the forum

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