Accessibility fixes.

This commit is contained in:
chriz committed 2026-10-20 11:11:04 +02:00
1 parent 02c92db1e5
commit 014422e0b6
12 files changed
+262 -176

No files matched your search

+96 -12
View File
@@ -18,7 +18,7 @@
--primary-light: #e6f4f8;
--primary-hover: #0e6285;
--accent: #0284c7;
--accent: #0277b5;
--accent-hover: #0369a1;
--accent-light: #e0f2fe;
--accent-dark: #075985;
@@ -32,21 +32,21 @@
--bg-alt: #f1f5f9;
--text-main: #1e293b;
--text-muted: #64748b;
--text-muted: #475569;
--text-light: #94a3b8;
--text-white: #ffffff;
--border: #e2e8f0;
--border-focus: #0284c7;
--border-focus: #0277b5;
/* State Colors */
--success: #16a34a;
--success: #166534;
--success-bg: #dcfce7;
--success-border: #86efac;
--danger: #dc2626;
--danger: #b91c1c;
--danger-bg: #fee2e2;
--danger-border: #fca5a5;
--warning: #d97706;
--warning: #b45309;
--warning-bg: #fef3c7;
/* Shadows */
@@ -113,6 +113,59 @@ a:hover {
text-decoration: underline;
}
/* Accessibility: Skip Link & Screen-Reader Utility */
.skip-link {
position: absolute;
top: -100px;
left: 1rem;
z-index: 9999;
background-color: var(--primary-dark);
color: #ffffff;
padding: 0.75rem 1.25rem;
border-radius: var(--radius-md);
font-weight: 700;
box-shadow: var(--shadow-lg);
border: 2px solid #ffffff;
text-decoration: none;
}
.skip-link:focus {
top: 0.75rem;
color: #ffffff;
outline: 3px solid var(--accent-light);
outline-offset: 2px;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* Accessibility: Keyboard Focus Visible */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.nav-toggle:focus-visible,
.gallery-item:focus-visible {
outline: 3px solid var(--accent);
outline-offset: 2px;
}
.top-bar a:focus-visible,
.site-footer a:focus-visible,
.hero-banner .btn:focus-visible {
outline: 3px solid #bae6fd;
outline-offset: 2px;
}
p {
margin-bottom: 1.15rem;
}
@@ -128,15 +181,18 @@ h1, h2, h3, h4, h5, h6 {
margin-bottom: 1rem;
}
h1 {
h1,
.h1-style {
font-size: 2rem;
letter-spacing: -0.02em;
position: relative;
padding-bottom: 0.75rem;
margin-top: 0;
margin-bottom: 1.5rem;
}
h1::after {
h1::after,
.h1-style::after {
content: '';
position: absolute;
bottom: 0;
@@ -975,7 +1031,8 @@ li {
transition: var(--transition);
}
.gallery-item:hover .gallery-overlay {
.gallery-item:hover .gallery-overlay,
.gallery-item:focus-visible .gallery-overlay {
opacity: 1;
}
@@ -1002,7 +1059,8 @@ li {
transition: var(--transition);
}
.gallery-item:hover .gallery-zoom-icon {
.gallery-item:hover .gallery-zoom-icon,
.gallery-item:focus-visible .gallery-zoom-icon {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
@@ -1461,7 +1519,7 @@ textarea.form-control {
.footer-bottom {
padding: 1.5rem 0;
font-size: 0.85rem;
color: #64748b;
color: #94a3b8;
display: flex;
justify-content: space-between;
align-items: center;
@@ -1470,7 +1528,7 @@ textarea.form-control {
}
.footer-bottom a {
color: #94a3b8;
color: #cbd5e1;
margin-left: 1rem;
}
@@ -1779,4 +1837,30 @@ h1, h2, h3, h4, p, li, .card, .location-card, .contact-detail-value, .btn {
.form-actions .btn {
width: 100%;
}
}
/* ==========================================================================
Reduced Motion Preference (WCAG 2.3.3)
========================================================================== */
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
.gallery-item:hover img,
.gallery-item:hover,
.feature-box:hover,
.btn:hover,
.header-cta-btn:hover {
transform: none !important;
}
}