Skip to content

Commit

Permalink
✨ Add ResponsivenessProvider and axeAccessibilityReporter() ✨
Browse files Browse the repository at this point in the history
  • Loading branch information
Aszurar committed Jan 16, 2024
1 parent 34afcc5 commit f16dce7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@ import { Dashboard } from './components/Dashboard'
import { Footer } from './components/Footer'
import { ThemeProvider } from './context/theme'
import { TransactionsProvider } from './context/transactions'
import { ResponsivenessProvider } from './context/responsiveness'
import { axeAccessibilityReporter } from './utils/axeAccessibilityReporter'

axeAccessibilityReporter()

export function App() {
return (
<ThemeProvider>
<TransactionsProvider>
<div className="flex min-h-screen flex-col antialiased">
<Header />
<Dashboard />
<Footer />
</div>
<ResponsivenessProvider>
<div className="flex min-h-screen flex-col antialiased">
<Header />
<Dashboard />
<Footer />
</div>
</ResponsivenessProvider>
</TransactionsProvider>
</ThemeProvider>
)
Expand Down
10 changes: 10 additions & 0 deletions src/utils/axeAccessibilityReporter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react'
import ReactDOM from 'react-dom'

export async function axeAccessibilityReporter() {
if (import.meta.env.DEV) {
const axe = await import('@axe-core/react')

axe.default(React, ReactDOM, 1000)
}
}

0 comments on commit f16dce7

Please sign in to comment.