1- import { GoogleAnalytics } from '@next/third-parties/google'
2- import type { Metadata } from 'next'
3- import { Geist , Geist_Mono } from 'next/font/google'
4- import React from 'react'
5- import { Providers } from 'wrappers/provider'
6- import { GTM_ID , IS_GITHUB_AUTH_ENABLED } from 'utils/credentials'
7- import AutoScrollToTop from 'components/AutoScrollToTop'
8- import BreadCrumbs from 'components/BreadCrumbs'
9- import Footer from 'components/Footer'
10- import Header from 'components/Header'
11- import ScrollToTop from 'components/ScrollToTop'
1+ import { GoogleAnalytics } from '@next/third-parties/google' ;
2+ import type { Metadata } from 'next' ;
3+ import { Geist , Geist_Mono } from 'next/font/google' ;
4+ import React from 'react' ;
5+ import { Providers } from 'wrappers/provider' ;
6+ import { GTM_ID , IS_GITHUB_AUTH_ENABLED } from 'utils/credentials' ;
7+ import AutoScrollToTop from 'components/AutoScrollToTop' ;
8+ import BreadCrumbs from 'components/BreadCrumbs' ;
9+ import Footer from 'components/Footer' ;
10+ import Header from 'components/Header' ;
11+ import ScrollToTop from 'components/ScrollToTop' ;
1212
13- import 'app/globals.css'
13+ import 'app/globals.css' ;
1414
1515const geistSans = Geist ( {
1616 subsets : [ 'latin' ] ,
1717 variable : '--font-geist-sans' ,
18- } )
18+ } ) ;
1919
2020const geistMono = Geist_Mono ( {
2121 subsets : [ 'latin' ] ,
2222 variable : '--font-geist-mono' ,
23- } )
23+ } ) ;
2424
2525export const metadata : Metadata = {
2626 description : 'Your gateway to OWASP. Discover, engage, and help shape the future!' ,
@@ -54,7 +54,7 @@ export const metadata: Metadata = {
5454 site : '@owasp' ,
5555 title : 'Home – OWASP Nest' ,
5656 } ,
57- }
57+ } ;
5858
5959export default function RootLayout ( {
6060 children,
@@ -64,24 +64,36 @@ export default function RootLayout({
6464 return (
6565 < html lang = "en" suppressHydrationWarning >
6666 < body
67- className = { `${ geistSans . variable } ${ geistMono . variable } antialiased min-h-screen flex flex-col` }
67+ className = { `
68+ ${ geistSans . variable } ${ geistMono . variable } antialiased
69+ flex flex-col min-h-screen
70+ supports-[min-height:100dvh]:min-h-[100dvh]
71+ overflow-x-hidden
72+ ` }
6873 >
74+ { /* Visually hidden but keyboard-focusable skip link for accessibility */ }
75+ < a
76+ href = "#main-content"
77+ className = "sr-only focus:not-sr-only focus:absolute focus:top-2 focus:left-2 bg-white p-2 z-50"
78+ >
79+ Skip to content
80+ </ a >
6981 < Providers >
7082 < AutoScrollToTop />
7183 < Header isGitHubAuthEnabled = { IS_GITHUB_AUTH_ENABLED } />
7284 < BreadCrumbs />
73-
74- { /* Wrap content in a flex-1 container to always push footer down */ }
75- < main className = "flex-1 flex flex-col" >
76- { children }
77-
85+ { /* Single document-wide main landmark for a11y; no nested mains */ }
86+ < main
87+ id = "main-content"
88+ className = "flex-1 flex flex-col min-w-0"
89+ >
90+ { children }
7891 </ main >
79-
80- < Footer />
92+ < Footer className = "mt-auto" />
8193 < ScrollToTop />
8294 </ Providers >
8395 </ body >
8496 < GoogleAnalytics gaId = { GTM_ID } />
8597 </ html >
86- )
98+ ) ;
8799}
0 commit comments