Commit 747507f
committed
A11y: Fix 18 contrast violations surfaced by the design-time checker
New `a11y-contrast` check found 18 real WCAG AA contrast failures
in the codebase that the axe E2E tests never flagged (because axe
only audits ~22 dialog states, while the design-time checker walks
every styled element).
Fixes grouped by pattern:
Soft status text on same-hue tinted bg (6 selectors). `.error-message`
(NetworkLoginForm), `.smb-native-note` (TransferDialog +
TransferProgressDialog), `.clear-error` (DriveIndexingSection),
`.port-status.warning`/`.port-status.unavailable` (McpServerSection),
`.btn-danger` base color (Button). Each used the brand
`--color-error` / `--color-warning` as fg on a tinted bg of the same
hue — ratios 3.3–4.5. Introduce `--color-error-text` (#b91c1c light,
#fca5a5 dark) and `--color-warning-text` (#9a3412 light, #fdba74 dark)
in `app.css`, and switch the failing selectors to the `-text` variants.
Brand-color tokens retained for non-text uses (borders, badges,
icon fills).
White text on warning orange (2 selectors). `.conflict-badge`
(KeyboardShortcutsSection) and `.viewer-action-btn` (viewer/+page).
`#ffffff` on warning orange clocked 2.03:1 in dark mode. Switch to
`--color-accent-fg` (always dark — already designed for text on
saturated bg, e.g. the accent-colored buttons).
Accent-gold hover on white (2 selectors). `.reset-button:hover`
(SettingRow) and `.appearance-link:hover` (AppearanceSection) used
`--color-accent-hover` which is a lighter gold (2.06:1 on white).
Keep the a11y-safe base color on hover and use `text-decoration:
underline` for hover affordance instead.
Timeout retry button (VolumeBreadcrumb). `.timeout-retry-button`
used `--color-warning` fg; on the hover bg `--color-bg-tertiary`
it dropped to 3.09:1. Switch to `--color-warning-text`.
After: `./scripts/check-a11y-contrast` reports 0 violations.1 parent a5b6a5f commit 747507f
12 files changed
Lines changed: 27 additions & 12 deletions
File tree
- apps/desktop/src
- lib
- file-explorer
- network
- file-operations/transfer
- settings
- components
- sections
- ui
- routes/viewer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
69 | 72 | | |
70 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
| |||
206 | 212 | | |
207 | 213 | | |
208 | 214 | | |
| 215 | + | |
| 216 | + | |
209 | 217 | | |
210 | 218 | | |
| 219 | + | |
211 | 220 | | |
212 | 221 | | |
213 | 222 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
905 | 905 | | |
906 | 906 | | |
907 | 907 | | |
908 | | - | |
| 908 | + | |
909 | 909 | | |
910 | 910 | | |
911 | 911 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
595 | | - | |
| 595 | + | |
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1152 | 1152 | | |
1153 | 1153 | | |
1154 | 1154 | | |
1155 | | - | |
| 1155 | + | |
1156 | 1156 | | |
1157 | 1157 | | |
1158 | 1158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
267 | 270 | | |
268 | 271 | | |
269 | 272 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
633 | | - | |
| 633 | + | |
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| |||
0 commit comments