Skip to content
Snippets Groups Projects
Commit ee485e69 authored by Yoan VALLET's avatar Yoan VALLET
Browse files

feat: disable focus on the main scrollable div

parent 7708cd02
No related branches found
No related tags found
1 merge request!321Features/accessibility navigation
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
import React from 'react' import React from 'react'
import { HashRouter } from 'react-router-dom' import { HashRouter } from 'react-router-dom'
import { createBrowserHistory } from 'history' import { createBrowserHistory } from 'history'
import { Layout, Main, Content } from 'cozy-ui/transpiled/react/Layout' import { Layout, Main, Content } from 'cozy-ui/transpiled/react/Layout'
import Routes from 'components/Routes/Routes' import Routes from 'components/Routes/Routes'
import Navbar from 'components/Navbar/Navbar' import Navbar from 'components/Navbar/Navbar'
import SplashRoot from './Splash/SplashRoot' import SplashRoot from './Splash/SplashRoot'
import SplashScreen from 'components/Splash/SplashScreen' import SplashScreen from 'components/Splash/SplashScreen'
import SplashScreenError from 'components/Splash/SplashScreenError' import SplashScreenError from 'components/Splash/SplashScreenError'
export const history = createBrowserHistory() export const history = createBrowserHistory()
export const App = () => { export const App = () => {
return ( return (
<HashRouter {...history}> <HashRouter {...history}>
<Layout> <Layout>
<SplashRoot <SplashRoot
splashComponent={SplashScreen} splashComponent={SplashScreen}
splashErrorComponent={SplashScreenError} splashErrorComponent={SplashScreenError}
> >
<Navbar /> <Navbar />
<Main> <Main>
<Content className="app-content"> <Content className="app-content" tabIndex="-1">
<Routes /> <Routes />
</Content> </Content>
</Main> </Main>
</SplashRoot> </SplashRoot>
</Layout> </Layout>
</HashRouter> </HashRouter>
) )
} }
export default App export default App
...@@ -110,7 +110,6 @@ const Content: React.FC<ContentProps> = ({ ...@@ -110,7 +110,6 @@ const Content: React.FC<ContentProps> = ({
handleCloseClick={handleFeedbackModalClose} handleCloseClick={handleFeedbackModalClose}
/> />
<div <div
role="main"
className="content-view" className="content-view"
style={{ style={{
marginTop: height, marginTop: height,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment