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

Review global attributes of HTML and SVG for parity #207

Closed
bkardell opened this issue Apr 6, 2020 · 3 comments
Closed

Review global attributes of HTML and SVG for parity #207

bkardell opened this issue Apr 6, 2020 · 3 comments
Assignees
Labels
compatibility Issues affecting backward compatibility css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification need resolution Issues needing resolution at MathML Refresh CG meeting need specification update Issues requiring specification changes need tests Issues related to writing WPT tests

Comments

@bkardell
Copy link
Collaborator

bkardell commented Apr 6, 2020

It seems that somehow we didn't spec that MathML's global attributes should support title when we did #118. It seems worth a careful review for parity here to see if/what we are missing and if we have reason to exclude that or not. Helpful to everyone if we cross-reference the same parity check for SVG so that if they leave something off, we can also see if that has history or rationale or is also just a miss.

Will catalog, see if we have tests, etc for how to move forward.

@bkardell bkardell self-assigned this Apr 6, 2020
@fred-wang fred-wang added compatibility Issues affecting backward compatibility css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification need resolution Issues needing resolution at MathML Refresh CG meeting need specification update Issues requiring specification changes need tests Issues related to writing WPT tests labels May 22, 2020
@bkardell
Copy link
Collaborator Author

bkardell commented Nov 9, 2020

I looked into this and it seems we do actually have good parity with SVG at this point in terms of what we support and don't here and we should probably just close and resolve to pursue increased alignment of SVG/MathML generally in the platform. Things get what we more generally think of as the "global attributes" (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes) from a lot of different interfaces and mixins. Some of these make a lot more sense than others and wind up being in Element itself (or something that Element mixes in like ARIAMixin - we get those) and some wind up being in HTMLOrSVG (aka HTMLOrForeignElement) etc... Our definitions pretty much match SVG which include pretty much the core set that people use or expect to work and none of the ones that aren't definitely universal. It seems that title was an interesting one here because it definitely feels to me like it should work, but at the current time neither SVG nor MathML (at least not that I see) define a title attribute (SVG has a title element). If we resolve as I suggested above, we could pursue whether it makes sense to add title or not together, it doesn't seem like SVG folks are necessarily opposed to adding it to the common mixin, but I don't think we should expand the scope if we can avoid it. The big implication here, i guess is mostly that it will not reflect for now as shown in https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=8667 - but it will do that similarly in both.

@AmeliaBR
Copy link

AmeliaBR commented Nov 9, 2020

Relevant SVG discussion is here: w3c/svgwg#395

So far, harmonizing with HTML global attributes (or DOM methods) has been done on a case-by-case basis, based on demand. In general, my policy is to support harmonization for implementation simplicity and author convenience. With title, though, there is the added complication of how it interacts with the SVG <title> element & therefore with accessible name calculations — so it's not going to be quite as simple.

@NSoiffer
Copy link
Contributor

Closing based on @bkardell's investigation and @AmeliaBR's follow-up that there are complications due to SVG's title element. This can always be reconsidered for level 2, but there doesn't seem to anyone pushing for it to be in level 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Issues affecting backward compatibility css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification need resolution Issues needing resolution at MathML Refresh CG meeting need specification update Issues requiring specification changes need tests Issues related to writing WPT tests
Projects
None yet
Development

No branches or pull requests

4 participants