Learn Accessibility by Building a Quiz - Step 40

Tell us what’s happening:

please i need help with this issue, i have tried every solution but i’m still stucked. here is my own code





Your code so far

<!-- file: index.html -->
<!-- User Editable Region -->

            <div class="question-block">
              <label>Do you have any questions:</label>
            </div>
            <div class="answer">
              <label for="text">
              <textarea rows="5" cols="24" id="text" name="text"></textarea>
              </label>
            </div>

<!-- User Editable Region -->
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36

Challenge Information:

Learn Accessibility by Building a Quiz - Step 40

Welcome back to the forum @nosa22

Here is a comparison of the original code and your code.

The code in blue is the original code, the code in red is your code.
The code in magenta is the overlap.

For this step you are not required to add a label element.
Add the for attribute to the existing label element.

Happy coding

The point of linking a label to an input/textarea is for accessibility such as screen-readers. (Though implied when the input is nested within the label, it’s good practice.)

In the exercise, you had linked a new label with no information. The exercise required linking the textarea to a label with information that allows the accessibility tools to know what it is. (In this case, the question.)