Learning Accessibility through Building a Quiz - questions

I’m going back through the new Responsive Web Design modules, and newly learning about the “method” attribute on forms. After doing some googling, can’t figure out why this step says “post” rather than “get” is the correct method. Also, I don’t think I’ve ever specified the method before on a form (in previous forms built in the course or on my survey form project), even though those forms also successfully submitted to a specified url, so I’m curious why this is popping up now.

The instructions:

Step 14
As this is a quiz, you will need a form for users to submit answers. You can semantically separate the content within the form using section elements.

Within the main element, create a form with three nested section elements. Then, make the form submit to https://freecodecamp.org/practice-project/accessibility-quiz, using the correct method.

the piece of code in question:

<form method="post" action="https://freecodecamp.org/practice-project/accessibility-quiz">

Link to the step: https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-accessibility-by-building-a-quiz/step-14

2 Likes

Lol I can see that I’m going to have more questions, so I’m just making a thread for myself. Would still appreciate answers to my first question, above.

My next question is on Step 30. It appears that the correct answer is to use the “true” and “false” id’s on both sets of questions? Why on earth is an id being repeated? Everything I have learned say repeating id’s is bad html.

My code:

<ul class="answers-list">
                <li>
                  <label for="true">
                    <input type="radio" id="true" />
                  </label>
                </li>
                <li>
                  <label for="false">
                    <input type="radio" id="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="true">
                    <input type="radio" id="true"/>
                  </label>
                </li>
                <li>
                  <label for="false">
                    <input type="radio" id="false"/>
                  </label>
                </li>
              </ul>

Link to the challenge: https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-accessibility-by-building-a-quiz/step-30

You can use whatever id’s you want. I used four different id’s and passed. You are correct, id’s should be unique in the HTML so you should not use an id more than once. If the test let you pass with duplicate id’s then that is just an oversight in the test.

Bottom line, it is not a requirement to use the id’s “true” and “false” for the inputs and you shouldn’t, regardless if the test let’s you.

Also, I would not keep adding more questions to this thread. If you have other questions then create new threads for them. People are most likely not going to keep coming back to this thread to see if you have more questions.

thanks! I appreciate your feedback.

I am currently stuck at the same place. i dont remember being taught about the form method. Am i wrong?

2 Likes

I think that is a part of the challenge maybe? like searching and problem solving.

glad I’m not the only one! you can definitely do some googling, but the various options I found remained a little confusing for me

I might be wrong, but I don’t think “the correct method” refers to anything other than the expected method (by the test). It’s not like you can’t use GET with a form submit but it isn’t handled the same way.

1 Like

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