Skip to content

Commit

Permalink
Add a hreftranslate attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
dtapuska committed Jul 31, 2018
1 parent 39c948b commit 410c539
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions source
Expand Up @@ -19422,6 +19422,7 @@ interface <dfn>HTMLDivElement</dfn> : <span>HTMLElement</span> {};</code></pre>
<dd><code data-x="attr-hyperlink-ping">ping</code></dd>
<dd><code data-x="attr-hyperlink-rel">rel</code></dd>
<dd><code data-x="attr-hyperlink-hreflang">hreflang</code></dd>
<dd><code data-x="attr-hyperlink-hreftranslate">hreftranslate</code></dd>
<dd><code data-x="attr-hyperlink-type">type</code></dd>
<dd><code data-x="attr-hyperlink-referrerpolicy">referrerpolicy</code></dd>
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
Expand All @@ -19435,6 +19436,7 @@ interface <dfn>HTMLAnchorElement</dfn> : <span>HTMLElement</span> {
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-a-rel">rel</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-a-relList">relList</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-a-hreflang">hreflang</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-a-hreftranslate">hreftranslate</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-a-type">type</span>;

[<span>CEReactions</span>] attribute DOMString <span data-x="dom-a-text">text</span>;
Expand All @@ -19461,8 +19463,10 @@ interface <dfn>HTMLAnchorElement</dfn> : <span>HTMLElement</span> {
<p>The <code data-x="attr-hyperlink-target">target</code>, <code
data-x="attr-hyperlink-download">download</code>, <code data-x="attr-hyperlink-ping">ping</code>,
<code data-x="attr-hyperlink-rel">rel</code>, <code
data-x="attr-hyperlink-hreflang">hreflang</code>, <code data-x="attr-hyperlink-type">type</code>,
and <code data-x="attr-hyperlink-referrerpolicy">referrerpolicy</code> attributes must be omitted
data-x="attr-hyperlink-hreflang">hreflang</code>, <code
data-x="attr-hyperlink-hreftranslate">hreftranslate</code>, <code
data-x="attr-hyperlink-type">type</code>, and <code
data-x="attr-hyperlink-referrerpolicy">referrerpolicy</code> attributes must be omitted
if the <code data-x="attr-hyperlink-href">href</code> attribute is not present.</p>

<p>If the <code data-x="attr-itemprop">itemprop</code> attribute is specified on an <code>a</code> element,
Expand Down Expand Up @@ -19562,6 +19566,11 @@ interface <dfn>HTMLAnchorElement</dfn> : <span>HTMLElement</span> {
data-x="dom-a-type">type</code></dfn>, must <span>reflect</span> the respective content attributes
of the same name.</p>

<p>The IDL attribute <dfn><code data-x="dom-a-hreftranslate">hreftranslate</code></dfn> must
<span>reflect</span> the <code data-x="attr-hyperlink-hreftranslate">hrefttranslate</code>
content attribute. If the UA does not support a client side translation service this attribute
must not be supported.</p>

<p>The IDL attribute <dfn><code data-x="dom-a-rellist">relList</code></dfn> must
<span>reflect</span> the <code data-x="attr-hyperlink-rel">rel</code> content attribute.</p>

Expand Down Expand Up @@ -22533,6 +22542,14 @@ document.body.appendChild(wbr);</code></pre>
associated with the resource to determine its language, not metadata included in the link to the
resource.</span></p>

<p>The <dfn><code data-x="attr-hyperlink-hreftranslate">hreftranslate</code></dfn> attribute on
<code>a</code> elements that create <span data-x="hyperlink">hyperlinks</span>, if present,
provides the desired translation language of the linked resource. The value must be a valid BCP 47
language tag. <ref spec=BCP47> When nativating the anchor, user agents that support client side
translation should invoke the translation engine providing the value of the attribute.
User agents that do not have a client side translation must not support this attribute
so that feature detection of this feature is possible.</p>

<p>The <dfn><code data-x="attr-hyperlink-type">type</code></dfn> attribute, if present, gives the
<span>MIME type</span> of the linked resource. It is purely advisory. The value must be a
<span>valid MIME type string</span>. <span w-nodev>User agents must not consider the <code
Expand Down Expand Up @@ -117981,6 +117998,11 @@ interface <dfn>External</dfn> {
<code data-x="attr-link-hreflang">link</code>
<td> Language of the linked resource
<td> Valid BCP 47 language tag
<tr>
<th> <code data-x="">hreftranslate</code>
<td> <code data-x="attr-hyperlink-hreftranslate">a</code>
<td> Desired language of the linked resource
<td> Valid BCP 47 language tag
<tr>
<th> <code data-x="">http-equiv</code>
<td> <code data-x="attr-meta-http-equiv">meta</code>
Expand Down

0 comments on commit 410c539

Please sign in to comment.