Freecodecamp: Two <g> elements with the same id = “legend”

Created on 3 Apr 2020  Â·  6Comments  Â·  Source: freeCodeCamp/freeCodeCamp

Hi! I’ve noticed that the two "g" elements have the same id. This is not a big deal but I think it would be better to change it somehow.
(https://www.freecodecamp.org/forum/t/two-g-elements-with-the-same-id-legend/366365)

Description:
In the CodePen example for https://www.freecodecamp.org/learn/data-visualization/data-visualization-projects/visualize-data-with-a-scatterplot-graph two elements have the same id = “legend”.

Steps:
1. Go to CodePen:
https://codepen.io/freeCodeCamp/full/bgpXyK
2. Open Dev Tools and inspect “legend” element.

Actual Result: There are two elements with the same id = “legend”.
Test for the 'User Story #13: I can see a legend containing descriptive text that has id="legend"' is passing ok.
 same-ids

Expected Result: “id” should be unique.

projects-frontend resolveshipping

All 6 comments

/cc @scissorsneedfoodtoo

@randomSveta, thank you for reporting this and for your detailed description. I'll update this project in the testing repo and on CodePen as soon as possible.

Hi @scissorsneedfoodtoo,
Thank you very much! Happy to help.

Thank you again for reporting this @randomSveta! We updated the code in the testable projects repo and deployed it to CodePen.

Could you take a look at the project on CodePen and confirm that there's only one legend id now?

HI @scissorsneedfoodtoo,

I've checked. Yes, there is only one id="legend". Tests are also ok.
one-id

Thank you for the quick response and problem-solving!

@randomSveta, awesome! Thank you again for reporting this issue and confirming that there's only one legend id now. Stay safe and happy coding.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

raisedadead picture raisedadead  Â·  3Comments

danielonodje picture danielonodje  Â·  3Comments

imhuyqn picture imhuyqn  Â·  3Comments

Tzahile picture Tzahile  Â·  3Comments

robwelan picture robwelan  Â·  3Comments