Repository: nodejs/nodejs.dev
Pull request #2811 (2022-10-01 07:54:45)

Fix: add missing main landmarks (a11y)
<!--
Please read the [Code of Conduct](https://github.com/nodejs/nodejs.dev/blob/main/CODE_OF_CONDUCT.md) and the [Contributing Guidelines](https://github.com/nodejs/nodejs.dev/blob/main/CONTRIBUTING.md) before opening a pull request.
-->

## Description

The download page was missing a main tag so I changed the wrapping div tag to a main tag to be semantically correct and work better for users of assistive tech.

## Related Issues

No related issue

### Check List

<!--
ATTENTION
Please follow this check list to ensure that you've followed all items before opening this PR
-->

- [x] I have read the [Contributing Guidelines](https://github.com/nodejs/nodejs.dev/blob/main/CONTRIBUTING.md) and made commit messages that follow the guideline.
- [x] I have run `npm run lint:js -- --fix` and/or `npm run lint:md -- --fix` for my JavaScript and/or Markdown changes.
  - This is important as most of the cases your code changes might not be correctly linted
- [x] I have run `npm run test` to check if all tests are passing, and/or `npm run test -- -u` to update snapshots if I created and/or updated React Components.
- [x] I have checked that the build works locally and that `npm run build` work fine.
- [ ] I've covered new added functionality with unit tests if necessary.



Patch:
diff --git a/src/pages/download/index.tsx b/src/pages/download/index.tsx
index 4dfd6683..b819115b 100644
--- a/src/pages/download/index.tsx
+++ b/src/pages/download/index.tsx
@@ -49,7 +49,7 @@ const DownloadPage = ({ data: { nodeReleases } }: Props): JSX.Element => {
 
   return (
     <Layout title="Download Node.js" description="Come get me!">
-      <div className={`home-container ${styles.downloadPageContainer}`}>
+      <main className={`home-container ${styles.downloadPageContainer}`}>
         <DownloadHeader release={selectedType} />
         <p className={styles.releaseDescription}>
           <FormattedMessage id="pages.download.description" />{' '}
@@ -72,7 +72,7 @@ const DownloadPage = ({ data: { nodeReleases } }: Props): JSX.Element => {
           selectedTypeRelease={typeRelease}
           handleTypeReleaseToggle={handleTypeReleaseToggle}
         />
-      </div>
+      </main>
     </Layout>
   );
 };


Test patch:
diff --git a/src/pages/download/__tests__/__snapshots__/index.test.tsx.snap b/src/pages/download/__tests__/__snapshots__/index.test.tsx.snap
index 606a1dce..e39d9913 100644
--- a/src/pages/download/__tests__/__snapshots__/index.test.tsx.snap
+++ b/src/pages/download/__tests__/__snapshots__/index.test.tsx.snap
@@ -189,7 +189,7 @@ exports[`Download page renders correctly 1`] = `
         </div>
       </div>
     </nav>
-    <div
+    <main
       class="home-container downloadPageContainer"
     >
       <div
@@ -792,7 +792,7 @@ exports[`Download page renders correctly 1`] = `
           </div>
         </div>
       </div>
-    </div>
+    </main>
     <footer
       class="footer"
     >
@@ -1132,7 +1132,7 @@ exports[`Download page should handle LTS to Current switch 1`] = `
         </div>
       </div>
     </nav>
-    <div
+    <main
       class="home-container downloadPageContainer"
     >
       <div
@@ -1735,7 +1735,7 @@ exports[`Download page should handle LTS to Current switch 1`] = `
           </div>
         </div>
       </div>
-    </div>
+    </main>
     <footer
       class="footer"
     >