HELP! Learn Accessibility by building a Quiz Step 16

Directions are:

Step 16

Every region role requires a visible label, which should be referenced by the aria-labelledby attribute.

To the section elements, give the following aria-labelledby attributes:

  • student-info
  • html-questions
  • css-questions

Then, within each section element, nest one h2 element with an id matching the corresponding aria-labelledby attribute. Give each h2 suitable text content.

My code is as follows:

 <form method="post" action="https://freecodecamp.org/practice-project/accessibility-quiz">
      
    <section role="region" aria-labelledby="student-info">
      <h1 id="student-info>student-info</h1>
</section>

  <section role="region" aria-labelledby="html-questions">
      <h1 id="html-questions">html-questions</h1>
</section>


        <section role="region" aria-labelledby="css-questions">
          <h1 id="css-questions
">css-questions</h1>
</section>
      </form>

the error I get is :

Test

Sorry, your code does not pass. Don’t give up.

Hint

You should give the second section element an aria-labelledby attribute of html-questions .

any suggestions on how to repair this???

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Hi @Ahav !

I have edited your post to include the challenge link.
In the future, please include the challenge link so we can see what lesson you are on.

You have two issues here

No.1:
You forget a closing set of quotes here

No.2:
Reread this part of the instructions more carefully.

Right now you are only using h1’s.
Remember that h1 should only be used once per html document and it is already being used here

     <h1>HTML/CSS Quiz</h1>

Once you make those changes, then the test will pass.

Hope that helps!

Hey JWilkins,

It definitely worked, thank you . Not sure how I missed that, but coding is forcing me to pay more attention to detail…
also thanks for the heads up about the backticks

Please check my post, which was hidden by the admin because it’s counted as spam. I don’t know why.

I described my difficulties in that post. I did check everything I wrote many times. I don’t think I made mistakes. I’m afraid it’s a bug in the lesson. I can’t continue my lesson right now. Please help me. :cry:

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