Problem with Applied Accessibility challenge

Tell us what’s happening:

Good morning everyone!

I’m having trouble completing the challenge “Applied Accessibility: Improve Accessibility of Audio Content with the audio Element” (see link below), as the bot running the validation tests seems to be malfunctioning here. I’m stuck getting the following error message " Your code should include a type attribute on the source tag with a value of audio/mpeg."

This is happening although my code contains this exact type attribute.
Moreover the file extension being .mp3, the type attribute value should be in my opinion audio/mp3.
What should I do?

Your code so far

  <h1>Real Coding Ninjas</h1>
  <p>A sound clip of Zersiax's screen reader in action.</p>
<audio controls>
<source src="" type="audio/mepg" />


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:76.0) Gecko/20100101 Firefox/76.0.

Challenge: Improve Accessibility of Audio Content with the audio Element

Link to the challenge:

Nevermind, my <p> element wasn’t nested into the <audio> tag which caused the tests to fail. Still concerned about the type attribute value though.

1 Like

don’t start thinking that everything you did is right.
but it is normal to be stuck on such things. Typos will always get you. With practice you will get better at spotting them, or start using editors that would be able to point out invalid words. (also those can’t catch everything tho)

and what have you written?

not what’s required

Hi @ilenia!

Thanks for your reply.

  1. Don’t assume that I think this way. I’m a beginner and I know it. Such a comment isn’t helping in any way and I think it’s kind of offending.

  2. Didn’t you read the thread and my first reply?
    My code is embedded there and the status of your answer is outdated.
    I found my mistake.

Moreover, I just raised the following concern: with the file extension being .mp3, why is the type attribute value "audio/mepg"? When I change it for "audio/mp3" then I can play the audio file, while with "audio/mepg" (as asked in the challenge) it can’t be played in the render window.

Because you’re typing it wrong. You’re typing “audio/mepg” and it’s actually “audio/mpeg”.
Once the typo is fixed it should play normally.

you didn’t, your mistake is a typo
you need to write type/mpeg, you wrote type/mepg

that’s what I meant. most of the times it is the human that cause the issues. most of the times the “I did everything right, but it doesn’t work” is false, it is that it doesn’t work because you didn’t everything right

1 Like

Alright… Sorry for this you were right there.

I was looking around the entire time for a typo but couldn’t find it. I guess I corrected it without noticing when I just changed where the element was nested.

I know that the programming is like maths: you get it right or you’re the one wrong, not the logic… but it could be also safe to assume that the audio file might have been updated and the bot hasn’t…

Anyway I think I’ve learnt I shouldn’t rush to conclusions. Thanks for this.

1 Like