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

Missing autofocus attribute for MathML elements #258

Open
fred-wang opened this issue Sep 12, 2024 · 7 comments
Open

Missing autofocus attribute for MathML elements #258

fred-wang opened this issue Sep 12, 2024 · 7 comments

Comments

@fred-wang
Copy link
Contributor

From https://w3c.github.io/mathml-core/#dom-and-javascript we override the HTMLOrForeignElement

which is still called HTMLOrSVGElement in HTML5:

https://html.spec.whatwg.org/multipage/dom.html#htmlorsvgelement
whatwg/html#5248

which has IDL attributes dataset (for data-*), nonce, autofocus and tabIndex (for tabindex).

But from https://w3c.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements I can't see where we define a content attribute autofocus for MathML.

(note: found while checking Gecko code here: https://searchfox.org/mozilla-central/rev/4a8bd8efdfaa43dd14a16d3cb15bf86796fd1def/dom/mathml/MathMLElement.h#87)

@davidcarlisle
Copy link
Collaborator

You suggest we fix by adding the attribute?

@fred-wang
Copy link
Contributor Author

Right, I think in this list

The id, class, style, data-*, nonce and tabindex attributes have the same syntax and semantics as defined for id, class, style, data-*, nonce and tabindex attributes on HTML elements.

@davidcarlisle
Copy link
Collaborator

I could do that (and update the schema at same time) Probably we'll want to add to full as well so full is a superset of core (I'll raise at the full meeting tonight)
I'll make a PR later

@fred-wang
Copy link
Contributor Author

OK thank you.

I assume this only has an effect on elements with a href or tabindex, so that's related to other pending discussions though.

@davidcarlisle
Copy link
Collaborator

yes i was wondering about that, but it seems that if we follow html we make it globally available with same semantics as html and if that's nothing in some cases so be it (rather than trying to enumerate where it is used?)

@davidcarlisle
Copy link
Collaborator

sigh I messed up the commit log ref but w3c/mathml-schema@74a8d2c

github-actions bot added a commit that referenced this issue Sep 13, 2024
SHA: b7eb63d
Reason: push, by davidcarlisle

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@davidcarlisle
Copy link
Collaborator

@fred-wang I think this is done (here and in the schema which shows in the mathml full spec)

I think there is an issue with the refspec markup in that I think the links in section 2.1.4 https://w3c.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements ought (like data-*) go to the definitions in html rather than back to the same section, but that applies to the existing tabindex and nonce attribute markup as well, so I think this can be closed.

I pushed to main rather than make PR as it seems non controversial and essentially trivial change in the spec text.

Please close here if you are happy with this change (I may look at the refspec markup later: the intention of [^htmlsvg-global/tabindex^] was to reference a different spec as determined by the refspec lookup, but that seems not to be happening)

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