Possible error in Applied Accessibility: Improve Accessibility of Audio Content with the audio Element

Having the following content of editor’s area of this challenge


HTML5's audio element gives semantic meaning when it wraps sound or audio stream content in your markup. Audio content also needs a text alternative to be accessible to people who are deaf or hard of hearing. This can be done with nearby text on the page or a link to a transcript.

The audio tag supports the controls attribute. This shows the browser default play, pause, and other controls, and supports keyboard functionality. This is a boolean attribute, meaning it doesn't need a value, its presence on the tag turns the setting on.

Here's an example:

<audio id="meowClip" controls>
  <source src="audio/meow.mp3" type="audio/mpeg" />
  <source src="audio/meow.ogg" type="audio/ogg" />

Note: Multimedia content usually has both visual and auditory components. It needs synchronized captions and a transcript so users with visual and/or auditory impairments can access it. Generally, a web developer is not responsible for creating the captions or transcript, but needs to know to include them.


    <h1>Real Coding Ninjas</h1>
    <p>A sound clip of Zersiax's screen reader in action.</p>

<audio id="meowClip" controls>
  <source src="https://s3.amazonaws.com/freecodecamp/screen-reader.mp3" type="audio/mpeg" />


I get " Your audio element should have a closing tag."

Removing HTML comment from the above fixes the problem. This is erraneous behavior of this challenge I guess - content of comment affects result of challenge, while it shouldn’t.

You may wonder why I included the challenge text? Well, I am saving for myself each challenge for future review. In some cases I include in comment all or part of challenge description for learning purposes.

Welcome, embeer.

Ideally, yes, the tests would be able to account for comments. Over the years, we have changed a few tests, because of similar behaviour.

However, you will encounter many failed tests in future challenges, if you continue the above steps, and we are unlikely to change the tests for such use cases.

There is an expectation that campers will only change what is asked of them, in the lessons. Many lessons even have text saying:

Do not change code above/below this line

So, I am telling you this as a warning: Even if contributors do take the time to change the tests to account for all comments from users, you will complete the challenges before this gets merged. Whilst this is erroneous, it is expected, and, for the time being, unavoidable.

I hope this clarifies any expectations.