Learn Accessibility by Building a Quiz - Step 32

Give the label elements text such that the input comes before the text. Then, give the input elements a value matching the text.

The text should either be True or False.

im doing exactly this but the output is refusing and i have idea why, please help

Welcome back to the FFC forum. We need your code and your topic should be link to the challenge step. Create a help post by press help button you can find in the challenge editor. When you try to “check your code” three times.
@achatora420

Learn Accessibility by Building a Quiz: Step 32 | freeCodeCamp.org

  • True
  • False

2

A label element nesting an input element is required to have a for attribute with the same value as the input's id
  • True
  • False

Paste your code with three ``` Back ticks in a separate line before and after your code.

<ul class="answers-list">
                <li>
                  <label for="q1-a1">
                    <input type="radio" id="q1-a1" value="true"/>
                    True
                  </label>
                </li>
                <li>
                  <label for="q1-a2">
                    <input type="radio" id="false" />
                    False
                  </label>
                </li>
              </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="true" />
                    True
                  </label>
                </li>
                <li>
                  <label for="q2-a2">
                    <input type="radio" id="false" />
                    False
                  </label>
                </li>
              </ul>

Hello! Try giving all the input elements value attributes set to either True or False like how you did in the first input element.
Example:

<label>
<input type="text" value="Pizza">
Pizza
</label>

You need to follow the instruction provided. When the checker flags for an error, it also provides what you are to do.
You’re doing great.
Below is

  • There is are 4 label elements. Give value of either True and False to the 1st two. Do the same to the other two.
  • Each input tag is embeded into each label element before the True or False text you may have.
    Now give each input a value attribute. Eachvalue attribute you let it be equal to text directly after the input.

Below is a sample:

<label>
  <input value="True">True
</label>

Your input id and label for attribute should have same value. And also missing value attribute and it’s value.

Same modification required here, I mentioned in above post.
@achatora420

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