Conversation
|
lgtm - I'm asking some people about the best way to go past this- but I don't think it blocks this first |
|
Assuming we do allow the additional link related attributes such as I suspect we should probably allow them all on Also once a native mathml |
| <p> | ||
| The <code><a></code> element accepts the attributes described | ||
| in <a href="#global-attributes"></a> as well as the all the attributes of the | ||
| <a href="https://html.spec.whatwg.org/#the-a-element">corresponding element in HTML</a>. |
There was a problem hiding this comment.
I don't know yet if we want to support all the attributes or just href. I wonder what SVG is doing?
Maybe we should check existing implementations and ask browser vendors for feedback here.
There was a problem hiding this comment.
SVG lists the attributes explicltly but is I think all of them https://svgwg.org/svg2-draft/linking.html#AElement, so ping, download etc not just href
There was a problem hiding this comment.
In practice SVG support isn't quite what is specified just as an fyi.
There was a problem hiding this comment.
I think regardless of that some IDL would be useful. For example, HTML A and Area elements when you call .toString() returns the href value. SVG does not have this, so it would be good to define if that behaviour is wanted.
There was a problem hiding this comment.
yeah, I think no... I want to hear some reasoning but it seems weirdly esoteric... It would be not great if relevant parts of math turned into URLs.
There was a problem hiding this comment.
The main requirement here is for linking in MathML. Using <a> and adopting the properties of HTML a are more about trying to better integrate MathML into the web platform, so whatever makes the most sense from an implementation perspective would I think be fine. Agreed it needs to be specified but I think changes from HTML a are fine if they don't cause implementation issues
|
Would it be possible to merge this as-is now to document The exact details of which attributes get copied over from HTML |
|
@davidcarlisle I think it's fine to merge for now - we can improve it as upstream changes. Maybe we immediately could open a followon |
SHA: 98d7316 Reason: push, by bkardell Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This adds a new section describing an
<a>element to address #142It has the layout rules of
mrowand the attributes and behavior of HTML<a>The exact words in particular the wording to pull in all the behaviors and accessibility/security issues of links probably needs further adjustment but if this PR could be merged sooner rather than later it would put down the intention to add linking to mathml-core and allow the mathml4 draft to have target sections to reference and polyfills and examples updated etc.
In the spec I have stated that all attributes of html
<a>are allowed but only highlightedhrefso attributes such astargetorrelare allowed but not described here. We could describe (or at least list) them explicitly here if that was thought necessary although for example we don't explicitly list all the event handler attributes such asonclickwe just reference the html spec.