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

Remove invalid SVG global attribute tests #1474

Merged
merged 1 commit into from
Jun 27, 2024
Merged

Conversation

foolip
Copy link
Member

@foolip foolip commented May 20, 2024

For most of these, there is no IDL attribute defined by SVG or any other
spec (such as filter effects) and no browser seems to have them as
non-standard extensions.

A few of these do however have IDL attributes defined, but in mixins
that are included by specific SVG elements interfaces:

href: https://svgwg.org/svg2-draft/types.html#InterfaceSVGURIReference
requiredExtensions: https://svgwg.org/svg2-draft/types.html#InterfaceSVGTests
systemLanguage: https://svgwg.org/svg2-draft/types.html#InterfaceSVGTests

textLength is only for SVGTextContentElement.

transform is only for SVGGraphicsElement.

The removed tests all fail in Chrome, Firefox and Safari. The remaining
4 tests all pass.

"id",
"kerning",
"lang",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lang is listed in https://svgwg.org/svg2-draft/struct.html#CommonAttributes but I think it's actually not possible to test because there is no reflected IDL attributes.

@Elchi3
Copy link
Member

Elchi3 commented May 28, 2024

It would be good to move these attributes to their relevant elements. If you don't feel like doing that in this PR then it would be good to at least file an issue. Seems like BCD should also move them from global attributes to specific attributes under the elements.

For most of these, there is no IDL attribute defined by SVG or any other
spec (such as filter effects) and no browser seems to have them as
non-standard extensions.

A few of these do however have IDL attributes defined, but in mixins
that are included by specific SVG elements interfaces:

href: https://svgwg.org/svg2-draft/types.html#InterfaceSVGURIReference
requiredExtensions: https://svgwg.org/svg2-draft/types.html#InterfaceSVGTests
systemLanguage: https://svgwg.org/svg2-draft/types.html#InterfaceSVGTests

textLength is only for SVGTextContentElement.

transform is only for SVGGraphicsElement.

The removed tests all fail in Chrome, Firefox and Safari. The remaining
4 tests all pass.
@foolip
Copy link
Member Author

foolip commented Jun 5, 2024

It would be good to move these attributes to their relevant elements. If you don't feel like doing that in this PR then it would be good to at least file an issue. Seems like BCD should also move them from global attributes to specific attributes under the elements.

I agree that having tests for SVG attribute support would be good. It's not that I don't feel like it, but it seems the necessary first step is a very big one: untangle all SVG attribute data and decide what should and shouldn't be a global attribute.

mdn/browser-compat-data#9462 is a good issue about that.

Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Philip! 👍

@Elchi3 Elchi3 merged commit 9c94741 into main Jun 27, 2024
5 checks passed
@Elchi3 Elchi3 deleted the svg-global-attributes branch June 27, 2024 21:47
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

Successfully merging this pull request may close these issues.

3 participants