freeCodeCamp
freeCodeCamp copied to clipboard
catphotoapp step 56 allows incorrect solution to be submitted
Describe the Issue
The challenge on step 56 of the cat photo app project allows incorrect code to be submitted as correct. The code that passes is:
<input id="loving" type="checkbox">Loving
<label for="loving" type="checkbox">Loving</label>
However the correct solution is:
<input id="loving" type="checkbox"><label for="loving">Loving</label>
Link to the challenge: https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/step-56
Affected Page
https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/step-56
Your code
<input id="loving" type="checkbox">Loving
<label for="loving" type="checkbox">Loving</label>
Expected behavior
This step is confusing enough without allowing multiple solutions to pass. Suggest tightening up the checks for this one.
Screenshots
System
- Device: Laptop
- OS: Windows 11
- Browser: Chrome
- Version: n/a
Additional context
came to my attention on the forum that someone was sharing the incorrect solution. (turns out that it was passing so I decided to open this issue)
Typically, we like to be a little lenient on tests. I guess the philosophy is that we would rather let an invalid solution pass then a valid solution fail. This doesn't feel like an invalid solution - the element still renders as intended, the extra attribute doesn't affect anything as far as I can tell. I guess the best solution would be to check that it only has the one expected attribute. I may be mistaken, but I would guess that this type of problem is present on a very large number of challenges across the curriculum. Any CSS challenge for example, you can add the expected code plus some additional properties, and it passes. I'm not sure it's worth trying to be this strict and I would vote to leave this as-is.
Edit: I'm actually not sure what the problem is that you are trying to show now @hbar1st. Is it the extra type
attribute in the label
element - or the spacing? Ahh, it's the extra loving
in there isn't it - I didn't catch that.
Yes I started noticing other tests allowing additional code to pass as well. For eg step 2 cat photo to app allows me to define 6 lines of headers from h1 to h6 and it passes.
My thought though is that this person's solution doesn't show that they understood what to do here. Oh well. Also it can be frustrating to tell someone how to fix their code and then they say something like : oh you were wrong cause my code passed.
That's just me though.
Hello,I'm also getting error in this step 56 after writing the correct code it states that your code does not pass.
This one