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;
|
-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 DECORATION ===== */
|
||||||
.diagonal-line {
|
.diagonal-line {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -131,9 +131,19 @@ export default async function RootLayout({
|
|||||||
return (
|
return (
|
||||||
<html lang="tr">
|
<html lang="tr">
|
||||||
<body className={`${martianMono.variable} antialiased`}>
|
<body className={`${martianMono.variable} antialiased`}>
|
||||||
<ClientWrapper>
|
{/* Skip to Main Content Link */}
|
||||||
{children}
|
<a
|
||||||
</ClientWrapper>
|
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
|
<script
|
||||||
type="application/ld+json"
|
type="application/ld+json"
|
||||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||||
|
|||||||
Reference in New Issue
Block a user