Skip to content

Commit

Permalink
Add spec_url data in html/global_attributes.json (#8064)
Browse files Browse the repository at this point in the history
* Add spec_url data in html/global_attributes.json

This change adds spec URLs in html/global_attributes.json for all global
attributes that have an mdn_url for an MDN article with a Specification(s)
table — with the exception that no spec data is added for any cases where
a URL found in an MDN Specification(s) table has no fragment-ID part.

* Use more-specific anchor for data-* spec URL

* Drop unnecessary additional spec URL for "hidden"

* Apply suggestions from code review

Co-authored-by: Florian Scholz <fscholz@mozilla.com>

Co-authored-by: Florian Scholz <fscholz@mozilla.com>
  • Loading branch information
sideshowbarker and Elchi3 authored Dec 20, 2020
1 parent 53dfb63 commit 24d24a9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions html/global_attributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"accesskey": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/accesskey",
"spec_url": "https://html.spec.whatwg.org/multipage/interaction.html#the-accesskey-attribute",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -52,6 +53,7 @@
"autocapitalize": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/autocapitalize",
"spec_url": "https://html.spec.whatwg.org/multipage/interaction.html#attr-autocapitalize",
"support": {
"chrome": {
"version_added": "43"
Expand Down Expand Up @@ -114,6 +116,7 @@
"autocomplete": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Attributes/autocomplete",
"spec_url": "https://html.spec.whatwg.org/multipage/#attr-fe-autocomplete",
"support": {
"chrome": [
{
Expand Down Expand Up @@ -262,6 +265,7 @@
"class": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/class",
"spec_url": "https://html.spec.whatwg.org/multipage/elements.html#classes",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -310,6 +314,7 @@
"contenteditable": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/contenteditable",
"spec_url": "https://html.spec.whatwg.org/multipage/editing.html#attr-contenteditable",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -601,6 +606,7 @@
"__compat": {
"description": "<code>data-*</code> attributes",
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/data-*",
"spec_url": "https://html.spec.whatwg.org/multipage/dom.html#attr-data-*",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -649,6 +655,7 @@
"dir": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/dir",
"spec_url": "https://html.spec.whatwg.org/multipage/dom.html#the-dir-attribute",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -697,6 +704,7 @@
"draggable": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/draggable",
"spec_url": "https://html.spec.whatwg.org/multipage/interaction.html#the-draggable-attribute",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -911,6 +919,7 @@
"hidden": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/hidden",
"spec_url": "https://html.spec.whatwg.org/multipage/interaction.html#the-hidden-attribute",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -959,6 +968,7 @@
"id": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/id",
"spec_url": "https://html.spec.whatwg.org/multipage/dom.html#the-id-attribute",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -1023,6 +1033,7 @@
"inputmode": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/inputmode",
"spec_url": "https://html.spec.whatwg.org/multipage/interaction.html#attr-inputmode",
"support": {
"chrome": {
"version_added": "66"
Expand Down Expand Up @@ -1100,6 +1111,7 @@
"is": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/is",
"spec_url": "https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is",
"support": {
"chrome": {
"version_added": "67"
Expand Down Expand Up @@ -1206,6 +1218,7 @@
"itemid": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemid",
"spec_url": "https://html.spec.whatwg.org/multipage/microdata.html#attr-itemid",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -1254,6 +1267,7 @@
"itemprop": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemprop",
"spec_url": "https://html.spec.whatwg.org/multipage/microdata.html#names:-the-itemprop-attribute",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -1302,6 +1316,7 @@
"itemref": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemref",
"spec_url": "https://html.spec.whatwg.org/multipage/microdata.html#attr-itemref",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -1350,6 +1365,7 @@
"itemscope": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemscope",
"spec_url": "https://html.spec.whatwg.org/multipage/microdata.html#attr-itemscope",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -1398,6 +1414,7 @@
"itemtype": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemtype",
"spec_url": "https://html.spec.whatwg.org/multipage/microdata.html#attr-itemtype",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -1446,6 +1463,7 @@
"lang": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/lang",
"spec_url": "https://html.spec.whatwg.org/multipage/dom.html#attr-lang",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -1494,6 +1512,7 @@
"part": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/part",
"spec_url": "https://drafts.csswg.org/css-shadow-parts-1/#part-attr",
"support": {
"chrome": {
"version_added": "73"
Expand Down Expand Up @@ -1552,6 +1571,10 @@
"slot": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/slot",
"spec_url": [
"https://html.spec.whatwg.org/multipage/dom.html#attr-slot",
"https://dom.spec.whatwg.org/#dom-element-slot"
],
"support": {
"chrome": {
"version_added": "53"
Expand Down Expand Up @@ -1658,6 +1681,7 @@
"spellcheck": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/spellcheck",
"spec_url": "https://html.spec.whatwg.org/multipage/interaction.html#attr-spellcheck",
"support": {
"chrome": {
"version_added": "9"
Expand Down Expand Up @@ -1706,6 +1730,7 @@
"style": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/style",
"spec_url": "https://html.spec.whatwg.org/multipage/dom.html#the-style-attribute",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -1754,6 +1779,7 @@
"tabindex": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/tabindex",
"spec_url": "https://html.spec.whatwg.org/multipage/interaction.html#attr-tabindex",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -1802,6 +1828,7 @@
"title": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/title",
"spec_url": "https://html.spec.whatwg.org/multipage/dom.html#the-title-attribute",
"support": {
"chrome": {
"version_added": true
Expand Down Expand Up @@ -1898,6 +1925,7 @@
"translate": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/translate",
"spec_url": "https://html.spec.whatwg.org/multipage/dom.html#attr-translate",
"support": {
"chrome": {
"version_added": true
Expand Down

0 comments on commit 24d24a9

Please sign in to comment.