refactor(App): update Box component to use 'main' role for improved semantics

- Changed Box component in App.js and PrerenderAppContent.js to use 'main' as the component role, enhancing accessibility and semantic structure of the application.
This commit is contained in:
sebseb7
2025-11-21 11:57:39 +01:00
parent d8678e261d
commit da81479d9b
2 changed files with 2 additions and 2 deletions

View File

@@ -228,7 +228,7 @@ const AppContent = ({ currentTheme, dynamicTheme, onThemeChange }) => {
<TitleUpdater /> <TitleUpdater />
<ScrollToTop /> <ScrollToTop />
<Header active categoryId={categoryId} key={authVersion} /> <Header active categoryId={categoryId} key={authVersion} />
<Box sx={{ flexGrow: 1 }}> <Box component="main" sx={{ flexGrow: 1 }}>
<Suspense fallback={ <Suspense fallback={
// Use prerender fallback if available, otherwise show loading spinner // Use prerender fallback if available, otherwise show loading spinner
typeof window !== "undefined" && window.__PRERENDER_FALLBACK__ ? ( typeof window !== "undefined" && window.__PRERENDER_FALLBACK__ ? (

View File

@@ -44,7 +44,7 @@ const PrerenderAppContent = (socket) => (
<CategoryList categoryId={209} activeCategoryId={null} socket={socket}/> <CategoryList categoryId={209} activeCategoryId={null} socket={socket}/>
</AppBar> </AppBar>
<Box sx={{ flexGrow: 1 }}> <Box component="main" sx={{ flexGrow: 1 }}>
<CarouselProvider> <CarouselProvider>
<Routes> <Routes>
<Route path="/" element={<MainPageLayout />} /> <Route path="/" element={<MainPageLayout />} />