GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: add main ARIA landmark to API docs · nodejs/node@337a676

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc
    • template.html
  • tools/doc
    • allhtml.mjs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/template.html‎

Copy file name to clipboardExpand all lines: doc/template.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ <h1>Node.js __VERSION__ documentation</h1>
7070

7171
__TOC__
7272

73-
<div id="apicontent">
73+
<div role="main" id="apicontent">
7474
__CONTENT__
7575
<!-- API END -->
7676
</div>
Collapse file

‎tools/doc/allhtml.mjs‎

Copy file name to clipboardExpand all lines: tools/doc/allhtml.mjs
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ for (const link of toc.match(/<a.*?>/g)) {
2727
const data = fs.readFileSync(new URL(`./${href}`, source), 'utf8');
2828

2929
// 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);
3131

3232
// Get module name
3333
const moduleName = href.replace(/\.html$/, '');
@@ -89,7 +89,7 @@ all = all.slice(0, tocStart.index + tocStart[0].length) +
8989
all.slice(tocStart.index + tocStart[0].length);
9090

9191
// 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);
9393
const apiEnd = all.lastIndexOf('<!-- API END -->');
9494
all = all.slice(0, apiStart.index + apiStart[0].length)
9595
.replace(

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.