Is the textarea label broken?

In the Accessibility Form course the label for textarea doesnt seem to work. Are we supposed to be able to click the label text and have the textarea focus? Cause it doesnt:

            <div class="question-block">
              <label for="customer">Are you a frontend developer?</label>
            <div class="answer">
              <select name="customer" id="customer" required>
                <option value="">Select an option</option>
                <option value="yes">Yes</option>
                <option value="no">No</option>
            <div class="question-block">
              <label for="css-questions">Do you have any questions:</label>
            <div class="answer">
              <textarea id="css-questions" name="css-questions" rows="5" cols="24" placeholder="Who is flexbox..."></textarea>

Where we add the label(step 39):

The code works for me.

I only checked this part, there might be a problem with your code or browser.
Try pressing Restart Step and then paste your code.

If this doesnt work you may want to try in another browser or in incognito mode.

The code works for me as well. I think they mean if you click the text above the textarea that says “Do you have any questions:” it does not select the textarea for them. I tested it on my end and clicking the text for the label element above the select and textarea elements direct me to the associated areas.

Weird, for me it just doesnt select the textarea.
Your selecting “Do you have any questions:” right?
Cause i can click the label for all the other elements and they all work, just not the textarea.

Yep. Selecting the text “Do you have any questions:” selects the textarea for me. Its weird that its not working that way for you. Could be something to do with either browser settings or the browser you are on. Assuming your browsers are up to date.

Selecting the text “Do you have any questions:” doesn’t select the textarea for me, But when I remove the - from css-questions the label selects textarea when clicked.

That’s very odd :o
Why removing the - from the name fix it to do that?
And i guess it was never the intent of the course to make the textarea selectable like the others? Isnt that strange? All the other elements were made this way except for textarea.

1 Like

If removing the - from the css-questions id or name solves the issue I wonder if some browsers or devices are not rendering the - character properly and it can cause other issues on the device with viewing content.

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