File tree Expand file tree Collapse file tree 14 files changed +79
-9
lines changed
ui-components/src/Common/SkipToContentButton Expand file tree Collapse file tree 14 files changed +79
-9
lines changed Original file line number Diff line number Diff line change 22
33import LanguageDropdown from '@node-core/ui-components/Common/LanguageDropDown' ;
44import Skeleton from '@node-core/ui-components/Common/Skeleton' ;
5+ import SkipToContentButton from '@node-core/ui-components/Common/SkipToContentButton' ;
56import NavBar from '@node-core/ui-components/Containers/NavBar' ;
67// TODO(@AvivKeller): I don't like that we are importing styles from another module
78import styles from '@node-core/ui-components/Containers/NavBar/index.module.css' ;
@@ -53,6 +54,10 @@ const WithNavBar: FC = () => {
5354
5455 return (
5556 < div >
57+ < SkipToContentButton >
58+ { t ( 'components.common.skipToContent' ) }
59+ </ SkipToContentButton >
60+
5661 < WithBanner section = "index" />
5762
5863 < NavBar
Original file line number Diff line number Diff line change @@ -16,7 +16,9 @@ const AboutLayout: FC<PropsWithChildren> = ({ children }) => (
1616 < WithSidebar navKeys = { [ 'about' , 'getInvolved' ] } />
1717
1818 < div >
19- < main > { children } </ main >
19+ < main id = "main" tabIndex = { - 1 } >
20+ { children }
21+ </ main >
2022
2123 < WithMetaBar />
2224 </ div >
Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ const ArticlePageLayout: FC<PropsWithChildren> = ({ children }) => (
1515 < WithSidebar navKeys = { [ ] } />
1616
1717 < div >
18- < main > { children } </ main >
18+ < main id = "main" tabIndex = { - 1 } >
19+ { children }
20+ </ main >
1921
2022 < WithMetaBar />
2123 </ div >
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ const BlogLayout: FC = () => {
5454 < WithNavBar />
5555
5656 < div className = { styles . blogLayout } >
57- < main >
57+ < main id = "main" tabIndex = { - 1 } >
5858 < BlogHeader category = { blogData . category } />
5959
6060 < WithBlogCategories
Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ const DefaultLayout: FC<PropsWithChildren> = ({ children }) => (
1414 < WithSidebar navKeys = { [ ] } />
1515
1616 < div >
17- < main > { children } </ main >
17+ < main id = "main" tabIndex = { - 1 } >
18+ { children }
19+ </ main >
1820 </ div >
1921 </ Article >
2022
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const DownloadLayout: FC<PropsWithChildren> = async ({ children }) => {
1818 < WithNavBar />
1919
2020 < div className = { styles . downloadLayout } >
21- < main >
21+ < main id = "main" tabIndex = { - 1 } >
2222 < h1 > { frontmatter . title } </ h1 >
2323
2424 < WithDownloadSection releases = { releases } >
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ const DownloadArchiveLayout: FC<PropsWithChildren> = ({ children }) => (
1010 < WithNavBar />
1111
1212 < div className = { styles . downloadLayout } >
13- < main > { children } </ main >
13+ < main id = "main" tabIndex = { - 1 } >
14+ { children }
15+ </ main >
1416 </ div >
1517
1618 < WithFooter />
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ const GlowingBackdropLayout: FC<
2222 < GlowingBackdrop />
2323
2424 < main
25+ id = "main"
26+ tabIndex = { - 1 }
2527 className = { classNames ( {
2628 [ styles . homeLayout ] : kind === 'home' ,
2729 } ) }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const LearnLayout: FC<PropsWithChildren> = ({ children }) => (
1717 < WithSideBar navKeys = { [ 'learn' ] } />
1818
1919 < div >
20- < main >
20+ < main id = "main" tabIndex = { - 1 } >
2121 { children }
2222
2323 < WithSidebarCrossLinks navKey = "learn" />
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const PostLayout: FC<PropsWithChildren> = ({ children }) => {
2727
2828 < div className = { styles . contentLayout } >
2929 < div className = { styles . postLayout } >
30- < main >
30+ < main id = "main" tabIndex = { - 1 } >
3131 { type === 'vulnerability' && < EOLAlert /> }
3232
3333 < h1 > { frontmatter . title } </ h1 >
You can’t perform that action at this time.
0 commit comments