Skip to content

Commit

Permalink
New attributes and update description
Browse files Browse the repository at this point in the history
  • Loading branch information
octref committed Feb 7, 2019
1 parent 13f7359 commit 2bdfbf5
Show file tree
Hide file tree
Showing 3 changed files with 433 additions and 19 deletions.
8 changes: 8 additions & 0 deletions data/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ htmlTags.forEach(t => {
a.description = matchingAttrDescription.description
}
})

const moreAttrs = []
matchingTagDescription.attributes.forEach(ad => {
if (t.attributes.filter(a => a.name === ad.name).length === 0) {
moreAttrs.push(ad)
}
})
t.attributes = t.attributes.concat(moreAttrs)
}
})

Expand Down
6 changes: 1 addition & 5 deletions data/mdnTagDescriptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -893,11 +893,7 @@
},
{
"name": "main",
"attributes": [
{
"description": "<body\\>\n <a href=\"#main-content\">Skip to main content</a>\n\n <!-- navigation and header content -->\n\n <main id=\"main-content\">\n <!-- main page content -->\n </main>\n</body>\n\n* [WebAIM: \"Skip Navigation\" Links](https://webaim.org/techniques/skipnav/)\n\n### Reader mode\n\nBrowser reader mode functionality will look for the presence of the `main` element, as well as [heading](/en-US/docs/Web/HTML/Element/Heading_Elements) and [content sectioning elements](/en-US/docs/Web/HTML/Element#Content_sectioning) when converting content into a specialized reader view.\n\n* [Building websites for Safari Reader Mode and other reading apps.](https://medium.com/@mandy.michael/building-websites-for-safari-reader-mode-and-other-reading-apps-1562913c86c9)"
}
]
"attributes": []
},
{
"name": "map",
Expand Down
Loading

0 comments on commit 2bdfbf5

Please sign in to comment.