GeezerVison is showing github.com — doc: add main ARIA landmark to API docs · nodejs/node@4829d97
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/template.html +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -70,7 +70,7 @@ <h1>Node.js __VERSION__ documentation</h1> |
70 | 70 |
|
71 | 71 | __TOC__ |
72 | 72 |
|
73 | | - <div id="apicontent"> |
| 73 | + <div role="main" id="apicontent"> |
74 | 74 | __CONTENT__ |
75 | 75 | <!-- API END --> |
76 | 76 | </div> |
|
Collapse file
Copy file name to clipboardExpand all lines: tools/doc/allhtml.mjs +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -27,7 +27,7 @@ for (const link of toc.match(/<a.*?>/g)) { |
27 | 27 | const data = fs.readFileSync(new URL(`./${href}`, source), 'utf8'); |
28 | 28 |
|
29 | 29 | // Split the doc. |
30 | | - const match = /(<\/ul>\s*)?<\/\w+>\s*<\w+ id="apicontent">/.exec(data); |
| 30 | + const match = /(<\/ul>\s*)?<\/\w+>\s*<\w+ role="main" id="apicontent">/.exec(data); |
31 | 31 |
|
32 | 32 | // Get module name |
33 | 33 | const moduleName = href.replace(/\.html$/, ''); |
@@ -89,7 +89,7 @@ all = all.slice(0, tocStart.index + tocStart[0].length) + |
89 | 89 | all.slice(tocStart.index + tocStart[0].length); |
90 | 90 |
|
91 | 91 | // Replace apicontent with the concatenated set of apicontents from each source. |
92 | | -const apiStart = /<\w+ id="apicontent">\s*/.exec(all); |
| 92 | +const apiStart = /<\w+ role="main" id="apicontent">\s*/.exec(all); |
93 | 93 | const apiEnd = all.lastIndexOf('<!-- API END -->'); |
94 | 94 | all = all.slice(0, apiStart.index + apiStart[0].length) |
95 | 95 | .replace( |
|