-
Notifications
You must be signed in to change notification settings - Fork 14
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
tab-navigation and links? #63
Comments
- Don't use asynchronous test to check MathMLElement onevent attributes. closes #19500 - Only test tab-navigation of MathML links when HTML links are tab-navigable. https://github.com/mathml-refresh/mathml/issues/152 https://github.com/Igalia/chromium-dev/issues/50 https://bugzilla.mozilla.org/show_bug.cgi?id=1571487#c30
The "platform convention" statement also appears in the tabindex portion of the whatwg doc:
I checked two sources about SVG and neither say anything about focus:
However, the SVG spec says this about links out of SVG:
I think the HTML specs should be considered more authoritative and so platform conventions should win out. |
Thanks for checking this. Yes, I think MathML links should really follow HTML links and so respect platform conventions. |
* Miscellaneous improvements to MathML DOM tests - Don't use asynchronous test to check MathMLElement onevent attributes. closes #19500 - Only test tab-navigation of MathML links when HTML links are tab-navigable. https://github.com/mathml-refresh/mathml/issues/152 https://github.com/Igalia/chromium-dev/issues/50 https://bugzilla.mozilla.org/show_bug.cgi?id=1571487#c30
… tests, a=testonly Automatic update from web-platform-tests Miscellaneous improvements to MathML DOM tests (#19534) * Miscellaneous improvements to MathML DOM tests - Don't use asynchronous test to check MathMLElement onevent attributes. closes #19500 - Only test tab-navigation of MathML links when HTML links are tab-navigable. https://github.com/mathml-refresh/mathml/issues/152 https://github.com/Igalia/chromium-dev/issues/50 https://bugzilla.mozilla.org/show_bug.cgi?id=1571487#c30 -- wpt-commits: c0a3f7ebe674581c4f1c22fd8bbfe86a5ea98e2b wpt-pr: 19534
… tests, a=testonly Automatic update from web-platform-tests Miscellaneous improvements to MathML DOM tests (#19534) * Miscellaneous improvements to MathML DOM tests - Don't use asynchronous test to check MathMLElement onevent attributes. closes #19500 - Only test tab-navigation of MathML links when HTML links are tab-navigable. https://github.com/mathml-refresh/mathml/issues/152 https://github.com/Igalia/chromium-dev/issues/50 https://bugzilla.mozilla.org/show_bug.cgi?id=1571487#c30 -- wpt-commits: c0a3f7ebe674581c4f1c22fd8bbfe86a5ea98e2b wpt-pr: 19534
… tests, a=testonly Automatic update from web-platform-tests Miscellaneous improvements to MathML DOM tests (#19534) * Miscellaneous improvements to MathML DOM tests - Don't use asynchronous test to check MathMLElement onevent attributes. closes #19500 - Only test tab-navigation of MathML links when HTML links are tab-navigable. https://github.com/mathml-refresh/mathml/issues/152 https://github.com/Igalia/chromium-dev/issues/50 https://bugzilla.mozilla.org/show_bug.cgi?id=1571487#c30 -- wpt-commits: c0a3f7ebe674581c4f1c22fd8bbfe86a5ea98e2b wpt-pr: 19534 UltraBlame original commit: 935413555b5d2dc01805518b67ae8a28e10c3ead
… tests, a=testonly Automatic update from web-platform-tests Miscellaneous improvements to MathML DOM tests (#19534) * Miscellaneous improvements to MathML DOM tests - Don't use asynchronous test to check MathMLElement onevent attributes. closes #19500 - Only test tab-navigation of MathML links when HTML links are tab-navigable. https://github.com/mathml-refresh/mathml/issues/152 https://github.com/Igalia/chromium-dev/issues/50 https://bugzilla.mozilla.org/show_bug.cgi?id=1571487#c30 -- wpt-commits: c0a3f7ebe674581c4f1c22fd8bbfe86a5ea98e2b wpt-pr: 19534 UltraBlame original commit: 935413555b5d2dc01805518b67ae8a28e10c3ead
… tests, a=testonly Automatic update from web-platform-tests Miscellaneous improvements to MathML DOM tests (#19534) * Miscellaneous improvements to MathML DOM tests - Don't use asynchronous test to check MathMLElement onevent attributes. closes #19500 - Only test tab-navigation of MathML links when HTML links are tab-navigable. https://github.com/mathml-refresh/mathml/issues/152 https://github.com/Igalia/chromium-dev/issues/50 https://bugzilla.mozilla.org/show_bug.cgi?id=1571487#c30 -- wpt-commits: c0a3f7ebe674581c4f1c22fd8bbfe86a5ea98e2b wpt-pr: 19534 UltraBlame original commit: 935413555b5d2dc01805518b67ae8a28e10c3ead
Potentially controversial, but a few discrete but related things I would like to throw out...
But idk... maybe that's way off/not viable. |
@bkardell wrote
It's funny how things turn out. MathML 1 and 2 didn't allow href= on everything and links used a specific From a markup perspective allowing href still seems quite natural, and a natural counterpart to allowing id= on anything, rather than the original html model of requiring A quick check in our current manual
suggests we have ~200 thousand mi mn mtext or mrow with an href attribute, so wrapping each of those in an That said, if allowing (essentially) all mathml elements to carry links and so have to be involved in rules for tab focus etc is an implementation burden, then introducing
For me as someone generating mathml documents, changing to put all links on mrow or all links on a new
yes although that's an awful lot of elements to be selected and links activated in our manual.. (Although the speed at which modern browsers do those kinds of updates is pretty impressive:-)
As I say above I wouldn't rule it out but what I don't actually have a feel for from your description is whether allowing href everywhere is actually causing implementation issues or whether you just think it looks odd given how html and svg evolved. (Even if it's only the latter, that isn't necessarily not a reason to change, making html-svg-mathml look like a coherent markup language for web documents is a good aim in itself)
Not so far off that it can't be considered, I think.... |
Indeed, we would follow HTML if we were creating a fresh spec, but that ship has sailed. We can follow it in core at the cost of having to write polyfills for what is likely a relatively common use case (as per what @davidcarlisle found for his company's usage. I agree with David that if this is a significant implementation issue, then we could change the way things happen core. However, the more core diverges from the full spec, the more problematic the whole MathML spec becomes. We could introduce @bkardell: isn't there a problem with your example code in that it always creates a new element every time the element is activated? I suppose I shouldn't be nit picking because you were just trying to show how one could do a "polyfill" (do you have a better name? Neither the MDN def nor the person who coined term (linked from MDN page) say anything about not modifying the DOM, so maybe it is proper usage?) |
My preference would be to keep allowing href on at least token elements and mrow, but if we do add |
I think it is the latter, as implementation has no issues, the code just moves to the generic MathElement rather than some specialized MathAnchorElement. |
I haven't read everything in details, but just to be clear: the href support is implemented in the element classes it has nothing to do with layout classes. And the implementations are basically just duplicating what is done for SVG/HTML So strictly speaking, it does not cause any implementation issue for the rest of the MathML layout. However, as @emilio explained in w3c/mathml#125 the fact that all elements are currently potentially links have some implications which are likely to get some push back from web engine & WHATWG reviewers. For the record, @rwlbuis uploaded https://chromium-review.googlesource.com/c/chromium/src/+/2035979 but we are probably not going to upstream it for now as it has lowest priority and open questions to resolve first. I didn't notice that @bkardell's polyfill was adding a |
I think @emilio mentioned that in Gecko having the stuff in the generic MathMLElement means that we have several link-specific class members for all MathML elements, which can increase memory usage. |
Also, any time the document base URL changes (e.g pushState), all links have to be invalidated. This means walking the list of all potential links, and if that means all MathML elements that can be a performance issue. There are some things that can be done to optimize this, but they're fragile and complicated. Basically, links are a lot more complex in both space and time than people seem to think. Allowing all MathML elements to be links adds a good bit of overhead, or implementation complexity, or both. |
I can confirm this. For example in chromium: Note that this does not take into account MathML at all. |
As per the core meeting today, I am removing the 'need resolution' and 'tests' tags and adding 'level 2'. I have not checked to see if the spec needs updating. |
Removed 'needs spec update' because core doesn't mention links and hence, there is nothing to say/update. That's all saved for core level 2 |
cc @rwlbuis
mathml/relations/html5-tree/tabindex-002.html checks that links are focusable as described in https://mathml-refresh.github.io/mathml-core/#focus ; however it also refers to https://html.spec.whatwg.org/multipage/interaction.html#focus which mentions that
<a>
are sometimes focusable area "depending on platform conventions"It seems on macOS a HTML links are not focusable: https://bugzilla.mozilla.org/show_bug.cgi?id=1571487#c30
I don't know what's the general rule (what about XLink's href, SVG
<a>
?) but MathML should probably be aligned on whatever existing rule for consistency.Also, it seems sometimes links are not focusable on Chromium: https://github.com/Igalia/chromium-dev/issues/50
The text was updated successfully, but these errors were encountered: