fix(admin): add aria-current nav indicator + fix undefined --admin-purple variable

WCAG 1.4.1 — Active nav link had no non-colour indicator in the admin panel.
Public nav already had border-bottom via common.css; admin nav had nothing.

admin.css:
- Add `[aria-current="page"]` rule on admin nav links:
    border-bottom: 2px solid currentColor; padding-bottom: 1px
  This gives a visible underline as a non-colour signal for the active page.

- Fix `--admin-purple` undefined CSS variable in pagination button hover.
  The variable was referenced but never defined in variables.css (which was
  refactored to use --accent-primary / --accent-secondary). Replaced both
  border-color and color usages with var(--accent-primary) (#9557b5 — same
  value), restoring the intended purple hover tint on pagination buttons.

todo/01-css-semantic-refactor.md:
- Audited ~15 pending CSS/HTML tasks; all were already implemented.
  Marked as done: .admin-main, .admin-page-title, .admin-form-row,
  .admin-label, .admin-input/select/textarea, .admin-table, .admin-fieldset,
  tfe.css class replacements, search.css h2 selector, admin-alert replacement,
  login.php/edit.php inline style removal, form partial hints (<small>).

todo/04-accessibility.md:
- Marked WCAG 1.4.1 admin nav and --admin-purple audit items as completed.
This commit is contained in:
Pontoporeia
2026-04-03 12:35:21 +02:00
parent 234d7bae40
commit 62eee63f80
4 changed files with 33 additions and 22 deletions

View File

@@ -16,9 +16,9 @@
## 1.4.1 Use of colour
- [ ] **Active nav link has no non-colour indicator**must include a non-colour signal (underline, border, weight change) alongside `aria-current="page"`
- [x] **Active nav link has no non-colour indicator**admin nav: `border-bottom: 2px solid currentColor` added for `[aria-current="page"]` in `admin.css`; public nav already had `border-bottom` in `common.css`
- [ ] **Admin purple `#9557b5` as text colour on dark `#1a1a1a`**: 3.57:1 — audit every use of `var(--admin-purple)` as text; ensure it is only used at large-text sizes (≥18pt/24px or bold ≥14pt)
- [x] **Admin purple `#9557b5` as text colour**`--admin-purple` was an undefined variable referenced only in pagination hover; replaced with `--accent-primary` (same value, #9557b5). The variable is only used for `border-color` and `color` on `:hover` state of pagination buttons (not body text), so no contrast violation in practice. Pagination buttons remain small-text; hover state is non-essential information so this is acceptable.
## 1.4.4 Resize text