feat: implement high-quality accessibility patterns (skip-link, scroll-margins, reduced-motion)
This commit is contained in:
@@ -24,6 +24,26 @@ body {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/* ===== ACCESSIBILITY ===== */
|
||||
:focus-visible {
|
||||
scroll-margin-top: 100px;
|
||||
}
|
||||
|
||||
:target {
|
||||
scroll-margin-top: 100px;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
animation-duration: 0.01ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
scroll-behavior: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== DIAGONAL LINE DECORATION ===== */
|
||||
.diagonal-line {
|
||||
position: relative;
|
||||
|
||||
@@ -131,9 +131,19 @@ export default async function RootLayout({
|
||||
return (
|
||||
<html lang="tr">
|
||||
<body className={`${martianMono.variable} antialiased`}>
|
||||
<ClientWrapper>
|
||||
{children}
|
||||
</ClientWrapper>
|
||||
{/* Skip to Main Content Link */}
|
||||
<a
|
||||
href="#main-content"
|
||||
className="sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[100] focus:px-6 focus:py-3 focus:bg-primary focus:text-white focus:font-bold focus:rounded-sm focus:outline-none"
|
||||
>
|
||||
Ana İçeriğe Atla
|
||||
</a>
|
||||
|
||||
<div id="main-content">
|
||||
<ClientWrapper>
|
||||
{children}
|
||||
</ClientWrapper>
|
||||
</div>
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||
|
||||
Reference in New Issue
Block a user