Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate clipId in HTML validation #1548

Closed
zepumph opened this issue Mar 15, 2023 · 4 comments
Closed

Duplicate clipId in HTML validation #1548

zepumph opened this issue Mar 15, 2023 · 4 comments
Assignees

Comments

@zepumph
Copy link
Member

zepumph commented Mar 15, 2023

From phetsims/my-solar-system#88

When I paste an unbuilt version of My Solar System into https://validator.w3.org/nu/#textarea, it tells me that we have a duplicate id for an element:

image

Looks like that is coming from

const clipId = `clip${this.node.getId()}`;

I wonder if MSS is special in how it applies two different clipAreas to the same node. Should we make that unique? Is this buggy at all? Feel free to unassign.

@jonathanolson
Copy link
Contributor

Not special, it's if there are multiple root SVG elements that need to show the same clip path. It's probably possible to append a unique ID for each SVG block onto all IDs used in such a manner.

It doesn't appear to cause issues so far, so it's unclear to me what priority handling that should be.

@zepumph
Copy link
Member Author

zepumph commented Mar 15, 2023

Makes sense! I don't think it is worth the trouble. Unassigning.

@jonathanolson
Copy link
Contributor

Clip areas actually stick with the SVGGroup, and bounce around between different SVG elements as needed. Each clip area now gets its own ID as part of phetsims/faradays-electromagnetic-lab#89, so I think this should be fixed. @zepumph any need to verify?

@zepumph
Copy link
Member Author

zepumph commented Mar 5, 2024

Thanks. I don't see that error in the validator now.

@zepumph zepumph closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants