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

Proposed changes for linking and tabindexing #21

Merged
merged 4 commits into from
Feb 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,10 @@ <h4>DOM and Javascript</h4>
corresponding MathML
<a href="#global-attributes">content attribute</a>.
</p>
<p>
All of the nodes representing <a>MathML Hyperlink Elements</a> in the DOM must implement, and expose to scripts the following <dfn><code>MathMLLinkableElement</code></dfn> interface.
</p>
<pre class="idl" data-include="webidl/MathMLLinkableElement.idl"></pre>
</section>
<section id="text-layout">
<h4>Text layout</h4>
Expand Down Expand Up @@ -452,9 +456,7 @@ <h4>Focus</h4>
apply, as defined in that specification.
</p>
<p>
Any MathML elements containing an href attribute are valid links
and are focusable. Their tabindex focus flag
must be set unless the user agent normally provides an alternative
All <code>MathMLLinkableElement</code> elements are potentially linkable with an <code>href</code> attribute. Their default tabindex is <code>0</code>. If their <code>href</code> contains a valid URL, their focus flag must be set unless the user agent normally provides an alternative
method of keyboard traversal of links, and they appear in the
sequential focus order.
</p>
Expand Down Expand Up @@ -527,10 +529,12 @@ <h3>Global Attributes</h3>
elements:
</p>
<ul>
<li><a>id</a></li>
<li><a>class</a></li>
<li><a><code>style</code></a></li>
<li><a><code>data-*</code></a></li>
<li><a><code>dir</code></a></li>
<li><a><code>displaystyle</code></a></li>
<li><a><code>href</code></a></li>
<li><a><code>mathbackground</code></a></li>
<li><a><code>mathcolor</code></a></li>
<li><a><code>mathsize</code></a></li>
Expand Down Expand Up @@ -791,6 +795,10 @@ <h3>The Top-Level <code>&lt;math&gt;</code> Element</h3>
respectively.
</div>
</section>
<section id="linkable-math-elements">
<h3><dfn>MathML Hyperlink Elements</dfn></h3>
<p>All <a href="#token-elements">token elements</a> and the <a href="#horizontally-group-sub-expressions-mrow">mrow</a> grouping element are potentially linkable and may contain an <code>href</code> attribute. They are the MathML equivalents of HTML's <a data-cite="html#the-a-element">a</a> and must follow all of the same criteria laid out for links there.</p>
</section>
</section>
<section class="normative">
<h2>Presentation Markup</h2>
Expand Down
16 changes: 16 additions & 0 deletions webidl/MathMLLinkableElement.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Exposed=Window]
interface MathMLLinkableElement : MathMLElement {
[CEReactions] attribute DOMString target;
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like this should closely follow:
https://html.spec.whatwg.org/#the-link-element.
So then href may be better?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

[CEReactions] attribute DOMString download;
Copy link
Contributor

Choose a reason for hiding this comment

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

Where does this come from?

Copy link
Contributor

Choose a reason for hiding this comment

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

[CEReactions] attribute USVString ping;
[CEReactions] attribute DOMString rel;
[SameObject, PutForwards=value] readonly attribute DOMTokenList relList;
[CEReactions] attribute DOMString hreflang;
[CEReactions] attribute DOMString type;

[CEReactions] attribute DOMString text;
Copy link
Contributor

Choose a reason for hiding this comment

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

what is this? Alt text?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

from a in HTML..

a . text
Same as textContent.


[CEReactions] attribute DOMString referrerPolicy;
};

MathMLElement includes HTMLHyperlinkElementUtils;