-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccessibility.css
More file actions
251 lines (211 loc) · 4.48 KB
/
accessibility.css
File metadata and controls
251 lines (211 loc) · 4.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
/* Accessibility Enhancements */
/* Skip Link */
.skip-link {
position: absolute;
top: -40px;
left: 6px;
background: var(--blueberry);
color: white;
padding: 8px;
text-decoration: none;
z-index: 1000;
border-radius: 4px;
font-weight: bold;
}
.skip-link:focus {
top: 6px;
}
/* Enhanced Focus Styles */
*:focus {
outline: 3px solid var(--magenta);
outline-offset: 2px;
}
/* Button and Link Focus */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
outline: 3px solid var(--magenta);
outline-offset: 2px;
}
/* High Contrast Focus for Interactive Elements */
.btn:focus,
.service-card:focus,
.testimonial-card:focus {
outline: 3px solid var(--magenta);
outline-offset: 2px;
box-shadow: 0 0 0 5px rgba(214, 51, 132, 0.2);
}
/* Screen Reader Only Text */
.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;
}
/* Enhanced Color Contrast */
.text-sage {
color: #495057; /* Darker for better contrast */
}
.text-blueberry {
color: #5a2d91; /* Slightly darker for better contrast */
}
/* Fix gray text contrast issues */
.text-gray-500 {
color: #374151; /* Much darker gray for better readability */
}
.text-gray-600 {
color: #1f2937; /* Dark gray for excellent contrast */
}
/* Fix light blue text contrast on dark backgrounds */
.text-blue-100 {
color: #dbeafe; /* Slightly darker light blue for better contrast */
}
/* Ensure sage background has sufficient contrast with white text */
.bg-sage {
background-color: #6b7f47; /* Darker sage for better contrast with white text */
}
/* Reduce Motion for Users with Vestibular Disorders */
@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;
}
}
/* High Contrast Mode Support */
@media (prefers-contrast: high) {
.bg-magenta {
background-color: #990033;
}
.bg-blueberry {
background-color: #4a1a5c;
}
.text-sage {
color: #000000;
}
.border-magenta {
border-color: #990033;
border-width: 2px;
}
.border-blueberry {
border-color: #4a1a5c;
border-width: 2px;
}
}
/* Improved Mobile Menu Accessibility */
.mobile-menu[aria-expanded="true"] {
display: block;
}
.mobile-menu[aria-expanded="false"] {
display: none;
}
/* Enhanced Button Styles for Better Accessibility */
button,
.btn {
min-height: 44px;
min-width: 44px;
cursor: pointer;
}
button:disabled,
.btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
/* Form Accessibility Improvements */
.form-group {
margin-bottom: 1.5rem;
}
.form-error {
color: #dc3545;
font-size: 0.875rem;
margin-top: 0.25rem;
}
.form-error-icon {
color: #dc3545;
margin-right: 0.5rem;
}
input:invalid,
textarea:invalid,
select:invalid {
border-color: #dc3545;
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}
input:valid,
textarea:valid,
select:valid {
border-color: #28a745;
}
/* Enhanced List Accessibility */
ul[role="list"],
ol[role="list"] {
list-style: none;
padding-left: 0;
}
/* Card Accessibility */
.service-card,
.testimonial-card {
position: relative;
}
.service-card:focus-within,
.testimonial-card:focus-within {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
/* Loading and Error States */
.loading {
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: .5;
}
}
/* Ensure minimum contrast ratios */
.bg-gray-50 {
background-color: #f8f9fa;
}
.text-gray-600 {
color: #495057;
}
/* Improved Link Accessibility */
a:not(.btn) {
text-decoration: underline;
text-underline-offset: 2px;
}
a:hover:not(.btn) {
text-decoration-thickness: 2px;
}
/* Status Messages */
.status-message {
padding: 1rem;
border-radius: 0.5rem;
margin: 1rem 0;
}
.status-success {
background-color: #d4edda;
border: 1px solid #c3e6cb;
color: #155724;
}
.status-error {
background-color: #f8d7da;
border: 1px solid #f5c6cb;
color: #721c24;
}
.status-info {
background-color: #cce7ff;
border: 1px solid #b8daff;
color: #004085;
}